character |
Description |
\ |
Marks the next character as a special character or literal. For example, "n" matches the character "n". "\ n" matches the line feed character. The sequence "\" and "\" match, "\" ("Match"). |
^ |
Matches the start position of the input. |
$ |
Matches the end of the input. |
* |
Matches the previous character 0 or more times. For example, "zo*" can Match "Z", "Zoo". |
+ |
Matches the previous character one or more times. For example, "zo+" can Match "zoo", but does not match "Z". |
? |
Matches the previous character 0 or more times. For example, "A?ve?" Can match "never" in the "VE". |
. |
Matches any character other than the newline character. |
(pattern) |
Match the pattern and remember the match. The matching substring can be used with the Item [0] from the matches collection as the result ... [N] Made. If you want to match the bracket characters (and), you can use "\ (" or "\)". |
X| Y |
Match x or y. For example, "Z|food" can match "Z" or "food". "(z|f) oo" matches "zoo" or "food". |
{n} |
N is a non-negative integer. Matches exactly N times. For example, "o{2}" cannot match "O" in Bob, but can match the first two o in "Foooood". |
{n,} |
N is a non-negative integer. Match at least N times. For example, "o{2,}" does not match "O" in "Bob", but matches all o in "Foooood". "O{1,}" is equivalent to "o+". "O{0,}" is equivalent to "o*". |
{n,m} |
m and n are non-negative integers. Match at least N times, at most m times. For example, "o{1,3}" matches the first three o in "Fooooood". "o{0,1}" is equivalent to "O?". |
[xyz] |
A character set. Matches one of the characters in parentheses. For example, "[ABC]" matches "a" in "plain". |
[^xyz] |
A negative character set. Matches any character that is not in this bracket. For example, "[^ABC]" can match "P" in "plain". |
[A-z] |
Represents a character in a range. Matches any character within the specified interval. For example, "[A-z]" matches any of the lowercase alphabetic characters between "a" and "Z". |
[^m-z] |
The character interval of the negation. Matches characters that are not in the specified interval. For example, "[M-z]" matches any character that is not between "M" and "Z". |
\b |
Matches the boundary of a word, which is the position between the word and the space. For example, "er\b" matches "er" in "never", but does not match "er" in "verb". |
\b |
Matches a non word boundary. "ea*r\b" matches the "ear" in "Never early". |
\d |
Matches a numeric character. equivalent to [0-9]. |
\d |
Matches a character that is not a number. equivalent to [^0-9]. |
\f |
Matches the page break. |
\ n |
Matches the line break character. |
\ r |
Matches the carriage return character. |
\s |
Matches any white character, including spaces, tabs, page breaks, and so on. Equivalent to "[\f\n\r\t\v]". |
\s |
Matches any non-white-space character. Equivalent to "[^ \f\n\r\t\v]". |
\ t |
matches the tab character. |
\v |
Matches the Vertical tab. |
\w |
Matches any word character, including underscores. Equivalent to "[a-za-z0-9_]". |
\w |
Matches any non word character. Equivalent to "[^a-za-z0-9_]". |
\num |
Matches num , where num is a positive integer. References are returned to the remembered match. For example, "(.) \1 "matches two consecutive identical characters. |
\ N |
Match N, where n is a octal value. The octal change value must be 1, 2 or 3 digits long. For example, both "\11" and "\011" match one tab. "\0011" is equivalent to "\001" and "1". The value of the octal converter cannot exceed 256. Otherwise, only the first two characters are considered part of an expression. Allows ASCII code to be used in regular expressions. |
\xN |
Match N, where n is a hexadecimal code-changing value. The hexadecimal transposition value must be exactly two digits long. For example, "\x41" matches "A". "\x041" is equivalent to "\x04" and "1". Allows ASCII code to be used in regular expressions. |