Regular charactersdescribe
\Mark the next character as a special character, or an primitive character, or a backward reference, or an octal escape character. For example,"n"Match characters"n"。"\n"Match a newline. Serial"\\"match"\"and"\("Then match"("。
^Matches the start position of the input string. If the Multiline property of the RegExp object is set, ^ also matches "\n"or"\r"The position afterwards.
$Matches the end position of the input string. If the Multiline property of the RegExp object is set, $ also matches "\n"or"\r"Previous location.
*Matches the previous subexpression zero or multiple times. For example, zo* can matchz"as well as"zoo".* is equivalent to {0,}.
+Matches the previous subexpression once or more times. For example,"zo+"Can match"zo"as well as"zoo", but not matched"z".+ is equivalent to {1,}.
?Matches the previous subexpression zero or once. For example,"do(es)?"Can match"does"or"does"In-Previous"do".? is equivalent to {0,1}.
{n}nis a non-negative integer. Match surenSecond-rate. For example,"o{2}"Cannot match"Bob"In-Previous"o", but matched"food"Two os in.
{n,}nis a non-negative integer. At least matchnSecond-rate. For example,"o{2,}"Cannot match"Bob"In-Previous"o", but match"foooood"All os in."o{1,}"Equivalent to"o+"。"o{0,}"It's equivalent to"o*"。
{n,m}mandnAll are non-negative integers, wheren<=m. Minimum matchnTime and maximum matchmSecond-rate. For example,"o{1,3}"Will match"fooooood"The first three os in it."o{0,1}"Equivalent to"o?". Please note that there cannot be spaces between commas and two numbers.
?When the character is followed by any other restriction character (*,+,?,{n},{n,},{n,m}) Afterwards, the matching pattern is non-greedy. The non-greedy pattern matches as few strings as possible, while the default greedy pattern matches as many strings as possible. For example, for string "oooo","o+?"Will match a single"o",and"o+"Will match all"o"。
.Match "\n"Any single character outside. To match include"\n"If any character is included, please use something like"(.|\n)"Mode."
(pattern)Match pattern and get this match. The obtained matches can be obtained from the generated Matches collection, using the SubMatches collection in VBScript, and using the $0…$9 attribute in JScript. To match parentheses characters, use "\("or"\)"。
(?:pattern)Match pattern but do not get the matching result, that is, this is a non-get match and is not stored for future use. This is used or character "(|)"It is useful to combine parts of a pattern. For example"industr(?:y|ies)"It's just a comparison"industry|industries"A simpler expression.
(?=pattern)Positive positive pre-check, matching the lookup string at the beginning of any string matching pattern. This is a non-get match, that is, the match does not need to be retrieved for later use. For example,"Windows(?=95|98|NT|2000)"Can match"Windows2000"In-Previous"Windows", but not matched"Windows3.1"In-Previous"Windows". Pre-checking does not consume characters, that is, after a match occurs, the next match's search begins immediately after the last match, rather than after the characters containing the pre-checking.
(?!pattern)Forward negative pre-check, matching the lookup string at the beginning of any string that does not match the pattern. This is a non-get match, that is, the match does not need to be retrieved for later use. For example"Windows(?!95|98|NT|2000)"Can match"Windows3.1"In-Previous"Windows", but not matched"Windows2000"In-Previous"Windows". Pre-checking does not consume characters, that is, after a match occurs, the next match's search begins immediately after the last match, rather than after the characters containing the pre-checking
(?<=pattern)The reverse affirmation pre-check is the opposite direction of the forward affirmation pre-check. For example,"(?<=95|98|NT|2000)Windows"Can match"2000Windows"In-Previous"Windows", but not matched"3.1Windows"In-Previous"Windows"。
(?<!pattern)Reverse negation of pre-review is the opposite direction to forward negation of pre-review. For example"(?<!95|98|NT|2000)Windows"Can match"3.1Windows"In-Previous"Windows", but not matched"2000Windows"In-Previous"Windows"。
x|yMatch x or y. For example,"z|food"Can match"z"or"food"。"(z|f)ood"Then match"zood"or"food"。
[xyz]Character collection. Match any character contained. For example,"[abc]"Can match"plain"In-Previous"a"。
[^xyz]A collection of negative values ​​characters. Match any characters not included. For example,"[^abc]"Can match"plain"In-Previous"p"。
[a-z]Character range. Match any character in the specified range. For example,"[a-z]"Can match"a"arrive"z"Arbitrary lowercase alphabetical characters in the range.
[^a-z]Negative value character range. Match any arbitrary characters that are not within the specified range. For example,"[^a-z]"Can match any non-existent"a"arrive"z"Arbitrary characters in range.
\bMatch a word boundary, which means the position between the word and space. For example,"er\b"Can match"never"In-Previous"er", but not matched"verb"In-Previous"er"。
\BMatch non-word boundaries. “er\B"Can match"verb"In-Previous"er", but not matched"never"In-Previous"er"。
\cxMatches the control characters specified by x. For example, \cM matches a Control-M or carriage return character. The value of x must be one of A-Z or a-z. Otherwise, treat c as an original meaning "c"character.
\dMatch a numeric character. Equivalent to [0-9].
\DMatch a non-numeric character. Equivalent to [^0-9].
\fMatch a page break. Equivalent to \x0c and \cL.
\nMatch a newline character. Equivalent to \x0a and \cJ.
\rMatch a carriage return character. Equivalent to \x0d and \cM.
\sMatch any whitespace characters, including spaces, tabs, page breaks, etc. Equivalent to [ \f\n\r\t\v].
\SMatch any non-whitespace characters. Equivalent to [^ \f\n\r\t\v].
\tMatch a tab character. Equivalent to \x09 and \cI.
\vMatch a vertical tab. Equivalent to \x0b and \cK.
\wMatch any word character that includes an underscore. Equivalent to "[A-Za-z0-9_]"。
\WMatch any non-word characters. Equivalent to "[^A-Za-z0-9_]"。
\xnmatchn,innis a hexadecimal escape value. The hexadecimal escape value must be the length of two numbers that are determined. For example,"\x41"match"A"。"\x041"It's equivalent to"\x04&1". ASCII encoding can be used in regular expressions.
\nummatchnum,innumis a positive integer. Reference to the obtained match. For example,"(.)\1"Match two consecutive identical characters.
\nIdentifies an octal escape value or a backward reference. if\nBefore at leastna retrieved subexpression,nFor backward reference. Otherwise, ifnis an octal number (0-7), thennAn octal escape value.
\nmIdentifies an octal escape value or a backward reference. if\nmAt least beforenma subexpression obtained,nmFor backward reference. if\nmAt least beforenone gets it,nFor a heel textmbackward reference. If the previous conditions are not met,nandmAll are octal numbers (0-7), thennmWill match octal escape valuesnm
\nmlifnis an octal number (0-3), andm and lAll are octal numbers (0-7), and match octal escaped values.nml。
\unmatchn,innis a Unicode character represented by four hexadecimal numbers. For example, \u00A9 matches the copyright symbol (©).
username/^[a-z0-9_-]{3,16}$/
password/^[a-z0-9_-]{6,18}$/
Password 2(?=^.{8,}$)(?=.*\d)(?=.*\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\n).*$(Composed of numbers/capsular letters/lowercase letters/punctuation marks, all four must be available, with more than 8 digits)
Hexadecimal value/^#?([a-f0-9]{6}|[a-f0-9]{3})$/
Email/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/
/^[a-z\d]+(\.[a-z\d]+)*@([\da-z](-[\da-z])?)+(\.{1,2}[a-z]+)+$/or\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
URL/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/ or[a-zA-z]+://[^\s]*
IP address/((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)/
/^(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/ or((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)
HTML tags/^<([a-z]+)([^<]+)*(?:>(.*)<\/\1>|\s+\//or<(.*)(.*)>.*<\/\1>|<(.*) \/>
Delete the code\\Comment(?<!http:|\S)//.*$
Match double-byte characters (including Chinese characters)[^\x00-\xff]
Chinese characters (characters)[\u4e00-\u9fa5]
Range of Chinese characters in Unicode encoding/^[\u2E80-\u9FFF]+$/
Chinese and full-width punctuation marks (characters)[\u3000-\u301e\ufe10-\ufe19\ufe30-\ufe44\ufe50-\ufe6b\uff01-\uffee]
Date (year-month-day)(\d{4}|\d{2})-((0?([1-9]))|(1[1|2]))-((0?[1-9])|([12]([1-9]))|(3[0|1]))
Date (month/date/year)((0?[1-9]{1})|(1[1|2]))/(0?[1-9]|([12][1-9])|(3[0|1]))/(\d{4}|\d{2})
Time (hours: minutes, 24-hour time)((1|0?)[0-9]|2[0-3]):([0-5][0-9])
Mainland China landline number(\d{4}-|\d{3}-)?(\d{8}|\d{7})
Mainland China Mobile Number1\d{10}
Mainland China Postal Code[1-9]\d{5}
Mainland China ID number (15 or 18 digits)\d{15}(\d\d[0-9xX])?
Non-negative integer (positive integer or zero)\d+
Positive integer[0-9]*[1-9][0-9]*
Negative integers-[0-9]*[1-9][0-9]*
Integer-?\d+
Decimals(-?\d+)(\.\d+)?
Blank row\n\s*\r or \n\n(editplus) or ^[\s\S ]*\n
QQ number[1-9]\d{4,}
Words that do not contain abc\b((?!abc)\w)+\b
Match the beginning and end blank characters^\s*|\s*$
Commonly used for editing
Here are some replacements for special Chinese (editplus)
^[0-9].*\n
^[^Chapter].*\n
^[Exercise].*\n
^[\s\S ]*\n
^[0-9]*\.
^[\s\S ]*\n
<p[^<>*]>
href="javascript:if\(confirm\('(.*?)'\)\)window\.location='(.*?)'"
<span style=".[^"]*rgb\(255,255,255\)">.[^<>]*</span>
<DIV class=xs0>[\s\S]*?</DIV>

Regular expression syntax

Regular expression syntax is your common regular expression quick lookup table, regular expression syntax query, commonly used regular expression syntax, regular expression basic syntax, subexpression syntax, regular expression modifier, regular expression greedy mode, regular expression non-greedy mode, and control of strings through simple and fast methods.

Access Log:
Advertising area 1