| Character | Description |
|---|
| \ | Marks the next character as a special character, or as an original character, or as a backward reference, or as an octal convert. For example, 'n' matches the character 'n'. '\n' matches a line break. Series "\\" matches "\\" and "\() matches "(). |
|---|
| ^ | Matches the beginning of the input string. If the Multiline properties of the RegExp object are set, ^ matches the position after " \\n " or " \\r ". |
|---|
| $ | Matches the end of the input string. If the Multiline properties of the RegExp object are set, the $ matches the position before " \\n " or " \\r ". |
|---|
| * | Matches the preceding subexpression zero times or more. For example, zo* matches "z " and "zoo " * equals {0,}. |
|---|
| + | Matches the previous sub-expressions once or more. For example, " zo+" matches "zo" and "zoo" but does not match "z". + equals {1,}. |
|---|
| ? | Matches the previous subexpression zero or one time. For example, "do(es)?" matches "do" in "do" or "does"? The equivalent is {0,}. |
|---|
| {n} | n is a non-negative integer. Matches the established n times. For example, "o{2}" does not match "o" in "Bob" but matches two os in "food". |
|---|
| {n,} | n is a non-negative integer. For example, “o{2,}” does not match “o” in “Bob”, but it matches all o in “foooood”. “o{1,}” equals “o+”. “o{0,}” equals “o*”. |
|---|
| {n,m} | m and n are both non-negative integers, of which n< =m. The minimum match is n and maximum is m. For example, “o{1,3}” will match the first three o in “foooood”. “o{0,}” equals “o?”. Note that there is no room between comma and two numbers. |
|---|
| ? | When the character follows any other limiter (*, +,?, {n}, {n,}, {n,}, {m}), the matching pattern is not greedy. The non-vory mode matches the search for as few strings as possible, while the default greed pattern matches the search for as many strings as possible. For example, the string "oo", "o+?" will match a single "o" and the "o+" will match all "o". |
|---|
| . | Matches any single character except " \n ". To match any character including " \n ", use a pattern like "[.\n] ". |
|---|
| (pattern) | Matches the pattern and obtains this match. Matches can be obtained from the generated Matches collection, uses SubMatches collections in VBScript, and $0.$9 in JScript. To match round brackets, use '\() or '\'. |
|---|
| (?:pattern) | Matching pattern without a matching result, which means that it is not a matching match and is not stored for later use. This is useful when using or character "(|)" to combine parts of a pattern. For example, "industr" is a simpler expression than "industry |industries". |
|---|
| (?=pattern) | This is a non-required match, that is, the match does not need to be accessed for future use. For example, " Windows (??=95|NT|2000) " matches " Windows 2000 ", but does not match " Windows" in "Windows3.1 ". The preview does not consume characters, that is, the next matching search begins immediately after the last match, and does not start after the prechecking. |
|---|
| (?!pattern) | Negative pre-check, matching the search string at the beginning of any string that does not match the pattern. This is a non-acquisition match, that is, the match does not need to be retrieved for later use. For example, " Windows(??95|NT|2000)" matches "Windows" in "Windows3.1", but does not match "Windows" in "Windows2000". The pre-check does not consume characters, that is, the next match search begins immediately after the last match has taken place, instead of starting with the character containing the preview. |
|---|
| x|y | matches x or y. For example, "z|food" matches "z" or "food". "(z|f)ood" matches "zood" or "food". |
|---|
| [xyz] | character set. Match any character included. For example, '[abc]' can match 'a' in 'plain'. |
|---|
| [^xyz] | Negative-value character collections. Match any character that is not included. For example, '[^abc]' matches 'p' in 'plain'. |
|---|
| [a-z] | character range. Match any character within the specified range. For example, " [a-z] " can match any lowercase characters within the range " a " to " z ". |
|---|
| [^a-z] | Negative value character range. Matches any character that is not within the specified range. For example, '[^a-z]' matches any character that is not within the range of 'a' to 'z'. |
|---|
| \b | Matches a word boundary, that is, the position between a word and a space. For example, "er\b" matches "er" in "never", but does not match "er" in "verb". |
|---|
| \B | Matches the non-word boundary. "er\B" matches "er" in "verb", but does not match "er" in "never". |
|---|
| \cx | Matches the control character specified by x. For example, \cM matches a Control-M or a return sign. The value of x must be one of A-Z or a-z. Otherwise, c is considered to be a original "c" character. |
|---|
| \d | Matches a numerical character. The value is equal to [0-9]. |
|---|
| \D | Matches a non-numeric character. The value is [^0-9]. |
|---|
| \f | Matches a page break. The value is equal to \\x0c and \\cl. |
|---|
| \n | Matches a line break. The equivalent is \\x0a and \\cJ. |
|---|
| \r | Matches a return sign. The price is equal to \\x0d and \cm. |
|---|
| \s | Matches any blank characters, including spaces, tabs, page breaks, etc. The value is equal to [\f\r\t\v]. |
|---|
| \S | Matches any non-empty character. The value is equal to [^f\r\t\v]. |
|---|
| \t | Matches a tab. Equivalent to \\x09 and \cI. |
|---|
| \v | Matches a vertical tab. The price is equal to \\x0b and \\cK. |
|---|
| \w | Matches any word characters that include underlineds. The equivalent is "[A-Za-z0-9 ]". |
|---|
| \W | Matches any non-word characters. The equivalent is "[^A-Za-z0-9 ]". |
|---|
| \xn | Matchn n, of which n is the hexadecimal conversion value. Hexadecimal conversion value must be long. For example, " \\x41 " matches " A ". " \\x041 " equals "\x04&1 ". Regular expressions can be coded using ASCII. |
|---|
| \num | Matches the num, of which num is a positive integer. A reference to the matching obtained. For example, "(................... |
|---|
| \n | Marks a octal conversion value or a backward reference. If you have at least n acquired subexpressions before \n, then n is quoted backwards. Otherwise, if n is an octal conversion value (0-7). |
|---|
| \nm | Marks a octal conversion value or a backward reference. If at least nm obtained a subexpression before \nm, then \n is quoted backwards. If \nm acquired at least n before, \n is quoted backwards. If the conditions are not met, \nm will match the octal conversion value nm if both n and m are octal (0-7). |
|---|
| \nml | If n is octal (0-3) and both m and l are octal (0-7), the octal conversion value is matched to nml. |
|---|
| \un | matches n, where n is a Unicode character expressed in four hexadecimals. For example, \u00A9 matches the copyright symbol (?). |
|---|