| Expression |
Syntax |
Description |
Example |
| Minimum, zero, or more |
@ |
Match 0 or more search items of the preceding expression and match as few characters as possible. |
E. @ E matches "Ente" and "erprise" in "enterprise", but does not match the complete word "enterprise ". |
| At least, one or more |
# |
Match one or more search items of the preceding expression and match as few characters as possible. |
AC # match words that contain the letter "A" and at least one letter "C", such as "Ace ". A. # s matches "acces" in the word "access ". |
| Repeated n times |
^ N |
Match the previous expression n times. |
[0-9] ^ 4 matches the sequence of any four digits. |
| Group |
() |
A group of expressions can be combined. To search for two different expressions in an operation, you can use grouping expressions to combine these two expressions. |
If you want to search for-[A-Z] [1-3] Or-[1-10] [A-Z], the two expressions should be combined as follows: ([A-Z] [1-3]) | ([1-10] [A-Z]). |
| Nth tagged text |
/N |
In the search or replace expression, it indicates the text that the nth tagged expression matches, where n is a number ranging from 1 to 9. In the replace expression,/0 inserts the entire matched text. |
If you search for a {[0-9]} and replace it with/1, then "a" is followed by all search items of the number with the following number. For example, "a1" is replaced by "1". Similarly, "a2" is replaced by "2. |
| Right-aligned Field |
/(W, n) |
In the replace expression, the nth labeled expression in the field is right aligned with at least w character width. |
If you search for a {[0-9]} and replace it with/(10, 1), then the "an" search item is replaced by an integer and right-aligned with 10 spaces. |
| Left-aligned Field |
/(-W, n) |
In the replace expression, the nth labeled expression in the field is left aligned with at least w character width. |
If you search for a {[0-9]} and replace it with/(-10, 1), then "an" is replaced by an integer and left aligned with 10 spaces. |
| Match prohibited |
~ (X) |
Match is not allowed when X appears in this position of the expression. |
Real ~ (Ity) matches "real" in "realty" and "really", but does not match "real" in "reality ". |
| Alphanumeric characters |
: |
Match expression ([a-zA-Z0-9]). |
Match any alphanumeric characters, such as "a", "A", "w", "W", and "5. |
| Letter |
: C |
Match expression ([a-zA-Z]). |
Match any letter, such as "a", "A", "w", and "W. |
| Decimal number |
: D |
Matching expression ([0-9]). |
Match any number, such as "4" and "6 ". |
| Hexadecimal number |
: H |
Matching expression ([0-9a-fa-f] + ). |
Matches any hexadecimal number, such as "1A", "Ef", and "007 ". |
| Rational Number |
: N |
Matching expression ([0-9] +. [0-9] *) | ([0-9] *. [0-9] +) | ([0-9] + )). |
Match any rational number, such as "2007", "1.0", and ". 9 ". |
| Letter string |
: W |
Match expression ([A-Za-Z] + ). |
Match any character string that only contains letters. |
| Escape Character |
/E |
Unicode U + 001b. |
Match the "escape" control character. |
| Bell |
/G |
Unicode U + 0007. |
Match the "Bell" control character. |
| Backspace |
/H |
Unicode U + 0008. |
Matches the "backspace" control character. |
| Tab |
/T |
Unicode U + 0009. |
Tab matching. |
| Unicode characters |
/X ##### or/u #### |
Matches the characters specified by the Unicode value. #### indicates the hexadecimal number. You can use the ISO 10646 code point or two Unicode code points that provide the value of the proxy item pair to specify characters outside the basic multilingual plane (that is, a proxy item. |
/U0065 matches the character "E ". |