Searching and replacing
The dialog boxes of searching an replacng have such parameters:
- Pattern
- A string to find.
- Replace by (in the replace dialog box only)
- String, which will substitute the found pattern.
- Case sensitive
- Consider case of letters (if it is off, capital and small letters
are equal).
- Whole word
- Search only those entries, which are whole words, but not part of
a word (for example, if the patter is "or", then only conjunctions
"or" will be found, but not all suffixes "or").
- Regular expressions
- Use regular expressions for searching.
In regular expressions, in addition to ordinary symbols, the
following metasymbols can be used:
- ^
- Beginning of line.
- $
- End of line.
- .
- Any symbol.
- \
- Interpret next symbol literally.
- *
- Zero or more times.
- +
- One or more times.
- {n}
- Exactly n times.
- {n,}
- Not less than n times.
- {n,m}
- From n to m times.
- [ ]
- Any simbol from the set (a range is indicated by symbol -);
for example, [aeiou0-9] matches any symbol of
a, e, i, o, u,
and digit from 0 to 9; other operators and
metasymbols don't work in the brackets.
- [^ ]
- None of the set, for example, [aeiou0-9] is none
of the set a, e, i,
o, u, and none of digits from 0 to 9.
- \w
- Any alpha-numeric symbol (including "_").
- \W
- Any non-alphanumeric symbol.
- \d
- Digit.
- \B
- Non-digit.
- \s
- Space symbol (space or tab).
- \S
- Non-space symbol.
- \t
- Tab symbol.
- \n
- Line delimiter (for multi-lines patterns).
- |
- Previous or next pattern, for example, fee|fie|foe
means "fee" or "fie" or "foe".
- ( )
- The round brackets group a subexpression, which can be used for
replace.
- $0 or $&
- Whole found regular expression.
- $n (n>0)
- Subexpression in round brackets number n (from left to right
beginning from one). If you need place a digit just after
$n, place n in braces:
${12}4.