character |
Description |
|
Marks the next character as a special character, or a literal character, or a back reference, or a octal escape character. For example, ' n ' matches the character ' n '. ' n ' matches a newline character. Sequence ' matches ' and ' ("matches" (). |
^ |
Matches the start position of the input string. If the Multiline property of the RegExp object is set, ^ also matches the position after ' n ' or ' R '. |
$ |
Matches the end position of the input string. If the Multiline property of the RegExp object is set, the $ also matches the position before ' n ' or ' R '. |
* |
Matches the preceding subexpression 0 or more times. For example, zo* can match "z" and "Zoo". * is equivalent to {0,}. |
+ |
Matches the preceding subexpression one or more times. For example, ' zo+ ' can match "Zo" and "Zoo", but cannot match "Z". + is equivalent to {1,}. |
? |
Match the preceding subexpression 0 times or once. For example, "Do (es)" can match "do" in "do" or "does". is equivalent to {0,1}. |
N |
n is a non-negative integer. Matches the determined n times. For example, ' o{2} ' cannot match ' o ' in ' Bob ', but can match two o in ' food '. |
{N,} |
n is a non-negative integer. Match at least n times. For example, ' o{2,} ' cannot match ' o ' in ' Bob ' but can match all o in ' Foooood '. ' O{1,} ' is equivalent to ' o+ '. ' O{0,} ' is equivalent to ' o* '. |
{N,m} |
M and n are nonnegative integers, of which n <= M. Matches n times at least and matches up to M times. Liu, "o{1,3}" will match the first three o in "Fooooood". ' o{0,1} ' is equivalent to ' o '. Notice that there is no space between the comma and the two number. |
? |
When the character is immediately following any of the other qualifiers (*, +,?, {n}, {n,}, {n,m}), the matching pattern is not greedy. Non-greedy patterns match as few strings as possible, while the default greedy pattern matches as many of the searched strings as possible. For example, for the string "oooo", ' o+? ' will match a single "O", and ' o+ ' will match all ' o '. |
. |
Matches any single character except "N". To match any character including ' n ', use a pattern like ' [. N] '. |
(pattern) |
Match pattern and get this match. The obtained matches can be obtained from the resulting matches collection, use the Submatches collection in VBScript, and use the $0...$9 property in visual Basic scripting Edition. To match the parentheses character, use ' (' or ') '. |
(?:p Attern) |
Matches pattern but does not get a matching result, which means it is a non fetch match and is not stored for later use. This is useful for combining parts of a pattern with the "or" character (|). For example, ' Industr (?: y|ies) is a more abbreviated expression than ' industry|industries '. |
(? =pattern) |
Forward lookup, matching the find string at the beginning of any string matching pattern. This is a non-fetch match, that is, the match does not need to be acquired for later use. For example, ' Windows (? =95|98| nt|2000) ' Can match windows in Windows 2000, but cannot match windows in Windows 3.1. It does not consume characters, that is, after a match occurs, the next matching search begins immediately after the last match, instead of starting after the character that contains the pre-check. |
(?! Pattern |
A negative check matches the lookup string at the beginning of any mismatched negative lookahead matches the search string at either point where a string is not matching. This is a non-fetch match, that is, the match does not need to be acquired for later use. For example, ' Windows (?! 95|98| nt|2000) ' Can match windows in Windows 3.1, but cannot match windows in Windows 2000. It does not consume characters, that is, after a match occurs, the next matching search begins immediately after the last match, instead of starting after the character that contains the pre-check. |
X|y |
Match x or Y. For example, ' Z|food ' can match "z" or "food". ' (z|f) Ood ' matches ' zood ' or ' food '. |
[XYZ] |
Character set combination. Matches any one of the characters contained. For example, ' [ABC] ' can match ' a ' in ' plain '. |
[^XYZ] |
Negative character set combination. Matches any characters that are not included. For example, ' [^ABC] ' can match ' P ' in ' plain '. |
[A-z] |
The range of characters. Matches any character within the specified range. For example, ' [A-z] ' can match any lowercase alphabetic character in the range ' a ' to ' Z '. |
[^a-z] |
Negative character range. Matches any character that is not in the specified range. For example, ' [^a-z] ' can match any character that is not in the range of ' a ' to ' Z '. |
B |
Matches a word boundary, which is the position between the word and the space. For example, ' Erb ' can match ' er ' in ' never ', but cannot match ' er ' in ' verb '. |
B |
Matches a non-word boundary. ' ErB ' can match ' er ' in ' verb ', but cannot match ' er ' in ' Never '. |
Cx |
Matches the control character indicated by X. For example, CM matches a control-m or carriage return character. The value of x must be one-a-Z or a-Z. Otherwise, c is treated as a literal ' C ' character. |
D |
Matches a numeric character. equivalent to [0-9]. |
D |
Matches a non-numeric character. equivalent to [^0-9]. |
F |
Matches a page feed character. Equivalent to x0c and CL. |
N |
Matches a line feed character. Equivalent to x0a and CJ. |
R |
Matches a carriage return character. Equivalent to x0d and CM. |
S |
Matches any white space character, including spaces, tabs, page breaks, and so on. equivalent to [FNRTV]. |
S |
Matches any non-white-space character. equivalent to [^ FNRTV]. |
T |
Matches a tab character. Equivalent to x09 and CI. |
V |
Matches a vertical tab. Equivalent to x0b and CK. |
W |
Matches any word character that includes an underscore. Equivalent to ' [a-za-z0-9_] '. |
W |
Matches any non word character. Equivalent to ' [^a-za-z0-9_] '. |
Xn |
Matches n, where n is the hexadecimal escape value. The hexadecimal escape value must be a determined two digits long. For example, ' x41 ' matches ' A '. ' x041 ' is equivalent to ' x04 ' & ' 1 '. You can use ASCII encoding in regular expressions ... |
Num |
Matches num, where num is a positive integer. A reference to the match that was obtained. For example, ' (.) 1 ' matches two consecutive identical characters. |
N |
Identifies a octal escape value or a back reference. N is a back reference if there are at least N obtained child expressions before n. Otherwise, if n is an octal number (0-7), then N is an octal escape value. |
Nm |
Identifies a octal escape value or a back reference. NM is a preceded if there are at least the IS before NM the subexpression obtained by the at least nm. If at least N is fetched before nm, then N is a back reference followed by a literal m. If all the preceding conditions are not satisfied, if both N and M are octal digits (0-7), NM will match the octal escape value nm. |
Nml |
If n is an octal number (0-3) and both M and L are octal digits (0-7), the octal escape value NML is matched. |
un |
matching n, where n is a Unicode character that is represented by four hexadecimal digits. For example, u00a9 matches the copyright symbol (?). |