An expression |
Grammar |
Description |
Any one character |
. |
Matches any one character except for the newline characters. |
Up to 0 items or more |
* |
Matches 0 or more search items for the preceding expression. |
Up to one or more |
+ |
Matches at least one search term for the preceding expression. |
Minimum of 0 items or more |
@ |
Matches 0 or more search items of the preceding expression, matching as few characters as possible. |
At least one or more |
# |
Matches one or more search items of the preceding expression, matching as few characters as possible. |
Repeat n times |
^N |
Matches the N search term for the preceding expression. For example,,de>[0-9]^4de> matches any 4-bit number sequence. |
Character |
[] |
Matches any one of the characters in []. To specify the range of characters, list the starting and ending characters separated by dashes (-), as shown in [A-z]. |
Characters that are not in the character set |
[^...] |
Matches any characters that are not in the character set after the ^. |
Header |
^ |
Positions the match to the beginning of the line. |
End of Line |
$ |
Positions the match to the end of the line. |
Word Head |
< |
Matches only if the word starts at this position in the text. |
Ending |
> |
Matches only if the word ends at this point in the text. |
Group |
() |
Group the sub-expressions. |
Or |
| |
Matches an expression before or after the or symbol (|). ). Most commonly used in groupings. For example,de> (Sponge|mud) bathde> matches "sponge bath" and "mud bath". |
Escape character |
\ |
Matches the character followed by a backslash (\). This allows you to find characters that are used in regular expression notation, such as {and ^. For example,de>\^de> search ^ characters. |
Tagged expression |
{} |
Marks the text that matches the expression in parentheses. |
Nth Tagged text |
\N |
In the Find or replace expression, indicates the text that the nth tagged expression matches, where n is a number from 1 to 9. In the Replace expression, you insert the entire matched text. |
Right-aligned fields |
\ (w,n) |
In the Replace expression, right-aligns the nth-tagged expression in the field to at least W character justifies. |
Align Left field |
\ (-w,n) |
In the Replace expression, the nth marked expression in the field is left-aligned at least W -character justifies. |
Prohibit match |
~ (X) |
Suppresses the match when X appears at this position in the expression. For example, de>real~ (ity)???? De> matches "real" in "realty" and "really", and does not match "real" in "reality". |
Alpha-Numeric characters |
: A |
Match expression ([a-za-z0-9]). |
Alphabetic characters |
: C |
Match expression ([a-za-z]). |
Decimal number |
:d |
Match expression ([0-9]). |
Hexadecimal number |
: H |
Match expression ([0-9a-fa-f]+). |
Identifier |
: I |
Match expression ([a-za-z_][a-za-z0-9_][a-za-z0-9_]*). |
Rational number |
: N |
Match expression ([0-9]+.[ 0-9]*) | ([0-9]*. [0-9]+) | ([0-9]+)). |
Quoted string |
: Q |
Match expression (("[^"]* ") | (' [^ ']* ')] |
Alphabetic string |
: W |
Match expression ([a-za-z]+) |
Decimal integer |
: Z |
Match expression ([0-9]+). |
Escape character |
\e |
Unicode u+001b. |
Bell |
\g |
Unicode u+0007. |
Backspace |
\h |
Unicode u+0008. |
Line break |
\ n |
Matches platform-independent line breaks. In the Replace expression, insert a newline character. |
Tabs |
\ t |
Match tabs, Unicode u+0009. |
Unicode characters |
\x#### or \u#### |
Matches the character given by the Unicode value, where # # is the hexadecimal number. You can specify characters outside the base multilingual plane (that is, a surrogate) with an ISO 10646 code point or two Unicode code point that provides the value of the surrogate pair. |