illustrateRegular expressions
URL (URL)[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?)
Email address\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
QQ number[1-9]\d{4,}
HTML tags (contains content or self-closing)<(.*)(.*)>.*<\/\1>|<(.*) \/>
Password (composed of numbers/capsular letters/lowercase letters/punctuation marks, all four must be available, more than 8 digits)(?=^.{8,}$)(?=.*\d)(?=.*\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\n).*$
Date (year-month-day)(\d{4}|\d{2})-((1[0-2])|(0?[1-9]))-(([12][0-9])|(3[01])|(0?[1-9]))
Date (month/date/year)((1[0-2])|(0?[1-9]))/(([12][0-9])|(3[01])|(0?[1-9]))/(\d{4}|\d{2})
Time (hours: minutes, 24-hour time)((1|0?)[0-9]|2[0-3]):([0-5][0-9])
Chinese characters (characters)[\u4e00-\u9fa5]
Chinese and full-width punctuation marks (characters)[\u3000-\u301e\ufe10-\ufe19\ufe30-\ufe44\ufe50-\ufe6b\uff01-\uffee]
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+)?
Words that do not contain abc\b((?!abc)\w)+\b
illustrateRegular expressions
username/^[a-z0-9_-]{3,16}$/
password/^[a-z0-9_-]{6,18}$/
Hexadecimal value/^#?([a-f0-9]{6}|[a-f0-9]{3})$/
Email/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/
URL/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
IP address/^(?:(?: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]?)$/
HTML tags/^<([a-z]+)([^<]+)*(?:>(.*)<\/\1>|\s+\/>)$/
Range of Chinese characters in Unicode encoding/^[u4e00-u9fa5],{0,}$/
Regular expression matching Chinese characters[\u4e00-\u9fa5]
Comment: Matching Chinese is really a headache, it's easy to do with this expression
Match double-byte characters (including Chinese characters)[^\x00-\xff]
Comment: It can be used to calculate the length of a string (a double-byte character length meter 2, ASCII character meter 1)
Regular expression matching blank lines\n\s*\r
Comment: Can be used to delete blank lines
Regular expressions matching HTML tags<(\S*?)[^>]*>.*?</\1>|<.*?/>
Comment: The version circulating online is too bad, and the above one can only match the part, and it is still powerless to use complex nested markers.
Regular expression matching the beginning and end whitespace characters^\s*|\s*$
Comment: It can be used to delete whitespace characters at the beginning and end of the line (including spaces, tabs, page breaks, etc.), a very useful expression
Regular expression matching email address\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
Comment: It is very practical when verifying the form
Regular expression matching URL[a-zA-z]+://[^\s]*
Comment: The functions of the version circulating online are very limited, and the above can basically meet the needs
Match whether the account is legal (beginning with letters, 5-16 bytes allowed, alphanumeric underscores allowed)^[a-zA-Z][a-zA-Z0-9_]{4,15}$
Comment: It is very practical when verifying the form
Match domestic phone numbers\d{3}-\d{8}|\d{4}-\d{7}
Comment: Matching forms are as follows: 0511-4405222 or 021-87888822
Match Tencent QQ number[1-9][0-9]{4,}
Comment: Tencent QQ number starts at 10,000
Match the postal code of mainland China[1-9]\d{5}(?!\d)
Comment: Mainland China postal code is 6 digits
Match ID card\d{15}|\d{18}
Comment: The ID card in mainland China is 15 or 18 digits
Match IP address\d+\.\d+\.\d+\.\d+
Comment: It is useful when extracting IP addresses
Match specific numbers:
^[1-9]\d*$//Match positive integer
^-[1-9]\d*$//Match negative integers
^-?[1-9]\d*$//Match integer
^[1-9]\d*|0$//Match non-negative integers (positive integer + 0)
^-[1-9]\d*|0$//Match non-positive integers (negative integer +0)
^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$//Match positive floating point number
^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$//Match negative floating point numbers
^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$//Match floating point numbers
^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$//Match non-negative floating point numbers (positive floating point numbers +0)
^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$//Match non-positive floating point numbers (negative floating point numbers +0)
Comment: It is useful when processing large amounts of data, and be careful to correct it when applying it in detail.
Match a specific string
^[A-Za-z]+$//Match a string composed of 26 English letters
^[A-Z]+$//Match strings composed of 26 English letters capitalization
^[a-z]+$//Match a string composed of 26 English letters lowercase
^[A-Za-z0-9]+$//Match a string composed of numbers and 26 English letters
^\w+$//Match strings composed of numbers, 26 English letters or underscores
characterdescribe
\Mark the next character as a special character, or an primitive character, or a backward reference, or an octal escape character. For example, "n" matches the character "n". "\n" matches a newline character. The 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, $ also matches the position before "\n" or "\r".
*Matches the previous subexpression zero or multiple times. For example, zo* can match "z" and "zoo". *Equivalent to {0,}.
+Matches the previous subexpression once or more times. For example, "zo+" can match "zo" and "zoo", but cannot match "z". + is equivalent to {1,}.
?Matches the previous subexpression zero or once. For example, "do(es)?" can match "do" in "do" or "does". ?Equivalent to {0,1}.
{n}n is a non-negative integer. Match the n times that are determined. For example, "o{2}" cannot match "o" in "Bob", but can match two os 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 os in "fooooood". "o{1,}" is equivalent to "o+". "o{0,}" is equivalent to "o*".
{n,m}Both m and n are non-negative integers, where n<=m. Match at least n times and match up to m times. For example, "o{1,3}" will match the first three os in "foooooood". "o{0,1}" is equivalent to "o?". Please note that there cannot be spaces between commas and two numbers.
?When the character is immediately followed by any other restriction character (*,+,?,{n},{n,},{n,m}), 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 the string "oooo", "o+?" will match a single "o", and "o+" will match all "o".
.Match 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 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 useful when using the character "(|)" to combine various parts of a pattern. For example, "industr(?:y|ies)" is an expression that is simpler than "industry|industries".
(?=pattern)Forward pre-check, match 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 "Windows" in "Windows2000", but cannot match "Windows" in "Windows3.1". 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)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 "Windows" in "Windows3.1", but cannot match "Windows" in "Windows2000". Pre-checking does not consume characters, that is, after a match occurs, the next match search begins immediately after the last match, rather than after the characters containing the pre-checking
x|yMatch x or y. For example, "z|food" can match "z" or "food". "(z|f)ood" matches "zood" or "food".
[xyz]Character collection. Match any character contained. For example, "[abc]" can match "a" in "plain".
[^xyz]A collection of negative values ​​characters. Match any characters not included. For example, "[^abc]" can match "p" in "plain".
[a-z]Character range. Match any character in the specified range. For example, "[a-z]" can match any lowercase alphabetical characters in the range "a" to "z".
[^a-z]Negative value character range. Match any arbitrary characters that are not within the specified range. For example, "[^a-z]" can match any arbitrary character that is not in the range of "a" to "z".
\bMatch a word boundary, which means the position between the word and space. For example, "er\b" can match "er" in "never", but cannot match "er" in "verb".
\BMatch non-word boundaries. "er\B" can match "er" in "verb", but cannot match "er" in "never".
\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 "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_]".
\xnMatch n, where n is a hexadecimal escape value. The hexadecimal escape value must be the length of two numbers that are determined. For example, "\x41" matches "A". "\x041" is equivalent to "\x04&1". ASCII encoding can be used in regular expressions. .
\numMatch num, where num is a positive integer. Reference to the obtained match. For example, "(.)\1" matches two consecutive identical characters.
\nIdentifies an octal escape value or a backward reference. If \n has at least n obtained subexpressions before, n is a backward reference. Otherwise, if n is an octal number (0-7), n is an octal escape value.
\nmIdentifies an octal escape value or a backward reference. If there are at least nm obtaining subexpressions before \nm, nm is a backward reference. If there are at least n retrieves before \nm, n is a backward reference followed by the literal m. If none of the previous conditions are satisfied, if n and m are octal numbers (0-7), then \nm will match the octal escape value nm.
\nmlIf n is an octal number (0-3), and both m and l are octal numbers (0-7), the octal escape value nml is matched.
\unMatch n, where n is a Unicode character represented by four hexadecimal numbers. For example, \u00A9 matches the copyright symbol (?).
Access Log:
Advertising area 1