Hello, I am the author of any-rule(a vscode plugin) and thank you for your long time love of any-rule. After more than a year of using any-rule, there are 10W + regetables in the background. Here are some of your favorite regetables in the past year.
Github.com/any86/any-r…
🔥 regular need
Not surprisingly, the most commonly used re is “phone”.
🚀 Specific usage data
Let’s take a look at the overall ranking of re usage over the last year.
Mobile phone number: China (loose), starting with 13,14,15,16,17,18,19
(12534)
/ ^ (? : (? : \ + |00)86)?1[3-9]\d{9} $/Copy the code
Mobile phone Number: China (strict), according to the latest mobile phone number segment released by the Ministry of Industry and Information Technology in 2019
(11382)
/ ^ (? : (? : \ + |00)86)?1(? : (? :3[\d])|(? :4[5-79]) | (? :5[0-35-9]) | (? :6[5-7]) | (? :7[0-8]) | (? :8[\d])|(? :9[189]))\d{8} $/Copy the code
The email (email)
(10555)
/ ^ (((^<>() \ \ [\].,; :\s@"]+(\.[^<>() \ \ [\].,; : \ s @ "] +) *) | (" + ")) @ ((\ [[0-9] {1, 3} \. [0-9] {1, 3} \. [0-9] {1, 3} \. [0-9] {1, 3} \]) | ((\ [a zA - Z - 0-9] + \.) +[a-zA-Z]{2,}))$/Copy the code
The password must contain at least six characters, including at least one uppercase letter, one lowercase letter, one digit, and one special character
(8118)
/^\S*(? =\S{6(,})? =\S*\d)(? =\S*[A-Z])(? =\S*[a-z])(? =\S*[!@#$%^&*? ] )\S*$/Copy the code
digital
(7577)
/^\d{1,} $/Copy the code
Mobile phone number in China (the most relaxed), as long as it starts with 1, if your mobile phone number is used to receive SMS, it is recommended to choose this one
(5899)
/ ^ (? : (? : \ + |00)86)?1\d{10} $/Copy the code
The id number (2 generations,18 digits) with the last digit being the check bit, which may be a number or character X
(5032)
/ ^ [1-9]\d{5} (? :18|19|20)\d{2} (? :0[1-9] |10|11|12(?) :0[1-9"|"1-2]\d|30|31)\d{3}[\dXx]$/
Copy the code
Phone Body Code (IMEI)
(4889)
/^\d{15.17} $/Copy the code
Id number, supporting 1/2 generation (15 /18 digits)
(4266)
/^\d{6} ((((((19|20)\d{2}) (0[13-9] |1[012]) (0[1-9"|"12]\d|30)) | (((19|20)\d{2}) (0[13578] |1[02])31) | ((19|20)\d{2})02(0[1-9] |1\d|2[0-8]) | ((((19|20) ([13579] [26"|"2468] [048] |0[48)) | (2000))0229))\d{3})|((((\d{2}) (0[13-9] |1[012]) (0[1-9"|"12]\d|30))|((\d{2}) (0[13578] |1[02])31)|((\d{2})02(0[1-9] |1\d|2[0-8|])) (((13579] [26"|"2468] [048] |0[048])0229))\d{2}))(\d|X|x)$/
Copy the code
Chinese/Chinese characters
(3978)
/ ^ (? :[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\u D86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD 86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/Copy the code
The train schedule
(3911)
/^[GCDZTSPKXLY1-9]\d{1.4} $/Copy the code
Chinese name
(3768)
/ ^ (? "[the] \ u4e00 - \ u9fa5 {2.16$/})Copy the code
User name verification, 4 to 16 characters (letters, digits, underscores, minus signs)
(3701)
/^[a-zA-Z0-9_-]{4.16} $/Copy the code
Number/currency amount (positive number only, check thousandth delimiter not supported)
(3315)
/ (? : ^1-9] ([0-9] +)? (? : \ [0-9] {1.2})? ($) |? : ^ (? :0) $) | (? : ^0-9]. \ [0-9] (? : [0-9])? $) /Copy the code
Time in 12 hours (hh:mm: SS)
(3115)
/ ^ (? :1[0-2] |0? [1-9] : [0-5]\d:[0-5]\d$/
Copy the code
Numbers and letters
(2559)
/^[A-Za-z0-9] + $/Copy the code
Bank card number (10 to 30 digits, covering public/private accounts, for referenceWeChat pay)
(2395)
/ ^ [1-9]\d{9.29} $/Copy the code
Tel phone (domestic), for example, 0341-86091234
(2250)
/ ^ (? : (? :\d{3} -)? \d{8} | ^ (? :\d{4} -)? \d{7.8(})? :-\d+)? $/Copy the code
Unify social credit codes
(2174)
/ ^ [0-9A-HJ-NPQRTUWXY]{2}\d{6} [0-9A-HJ-NPQRTUWXY]{10} $/Copy the code
The decimal
(2146)
/^\d+\.\d+$/
Copy the code
Url (or IP) that must have a port number
(2104)
/^((ht|f)tps? : \ \ /)? [\w-]+(\.[\w-]+)+:\d{1.5} \ /? $/Copy the code
Hexadecimal color
(1584)
/ ^ #? ([a-fA-F0-9] {6}|[a-fA-F0-9] {3$/})Copy the code
24-hour system time (HH:mm: SS)
(1561)
/ ^ (? : [01]\d|2[0-3] : [0-5]\d:[0-5]\d$/
Copy the code
The date (date)
(1510)
/^\d{1.4} (-) (1[0-2] |0? [1-9\])1(0? [1-9"|"1-2]\d|30|31) $/Copy the code
Greater than or equal to 0, less than or equal to 150, support the decimal 5, such as 145.5, used to judge the score of the test paper
(1459)
/ ^150$| ^ (? :\d|[1-9]\d|1[0-4]\d)(? : \. 5)? $/Copy the code
License plate Number (New energy + Non-new Energy)
(1372)
/^[a-hJ-NP-z][A-hJ-NP-z0 -][a-hJ-NP-z0 -][a-hJ-NP-z0 -][a-hJ-NP-z0 -9] {4.5}[A-HJ-NP-Z0-9Hong Kong/Macau]$/Copy the code
Digital/monetary amount (negative numbers, thousandth delimiters supported)
(1337)
/ ^ -? \d+(,\d{3})*(\.\d{1.2})? $/Copy the code
IP – v4 [: port]
(1311)
/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5\]). {3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5(])? : : (? : [0-9"|"1-9] [0-9] {1.3} | [1-5] [0-9] {4} |6[0-4] [0-9] {3} |65[0-4] [0-9] {2} |655[0-2] [0-9] |6553[0-5))? $/Copy the code
Cannot contain letters
(1267)
/^[^A-Za-z]*$/
Copy the code
Chinese and Numbers
(1258)
/ ^ ((? :[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\u D86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD 86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])|(\d))+$/Copy the code
Unified Social Credit Code (Loose matching)(15 /18 /20 digits/letters)
(1253)
/ ^ (((0-9A-Za-z]{15}) | ([0-9A-Za-z]{18}) | ([0-9A-Za-z]{20$/}))Copy the code
HTML tags (loose matching)
(1133)
/<(\w+)[^>]*>(.*?< 1 > \ / \)? /Copy the code
Thunderbolt link
(1106)
/^thunderx? :\/\/[a-zA-Z\d]+=$/Copy the code
The QQ id format is correct
(1103)
/ ^ [1-9] [0-9] {4.10} $/Copy the code
It can contain both numbers and letters
(1073)
/ ^ (? =.*[a-zA-Z])(? =.*\d).+$/Copy the code
Image link address (image format can be added or deleted as required)
(1057)
/^https? :\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/iCopy the code
Specifies whether the account is valid. It must start with a letter and contain 5 to 16 characters. Alphanumeric and underscore (_) are allowed
(975)
/^[a-zA-Z]\w{4.15} $/Copy the code
Macao Identity Card
(967)
/ ^ [1|5|7]\d{6}\(\d\)$/
Copy the code
Capital letter
(939)
/^[A-Z]+$/
Copy the code
Wechat (WX), 6 to 20 characters, beginning with a letter, letter, digit, minus sign, underscore
(900)
/^[a-zA-Z][-_a-zA-Z0-9] {5.19} $/Copy the code
The English alphabet
(890)
/^[a-zA-Z]+$/
Copy the code
License plate Number (non-new Energy)
(852)
/^[a-hJ-NP-z][A-hJ-NP-z0 -][a-hJ-NP-z0 -][a-hJ-NP-z0 -][a-hJ-NP-z0 -9] {4}[A-HJ-NP-Z0-9Hong Kong/Macau]$/Copy the code
License plate Number (New Energy)
(813)
/^[a-hj-Np-z][a-hj-NP-z](? :((\d{5}[A-HJK])|([A-HJK][A-HJ-NP-Z0-9] [0-9] {4}))|[A-HJ-NP-Z0-9] {4}[A-HJ-NP-Z0-9Hong Kong and Macao])$/Copy the code
Id Number (1 generation,15 digits)
(809)
/ ^ [1-9]\d{7} (? :0\d|10|11|12(?) :0[1-9"|"1-2][\d]|30|31)\d{3} $/Copy the code
Passport (including Hong Kong and Macao)
(724)
/(^[EeKkGgDdSsPpHh]\d{8}$)|(^(([Ee][a-fA-F])|([DdSsPp][Ee])|([Kk][Jj])|([Mm][Aa])|(1[45]))\d{7} $) /Copy the code
Version must be in X.Y.Z format
(706)
/^\d+(? :\.\d+){2} $/Copy the code
HTML comments
(704)
/ <! --[\s\S]*? -->/gCopy the code
The English name
(703)
/(^[a-zA-Z][a-zA-Z\s]{0.20}[a-zA-Z]$)/
Copy the code
Magnetic linking (loose matching)
(692)
/^magnet:\? xt=urn:btih:[0-9a-fA-F]{40$/,}. *Copy the code
Zip Code (China)
(569)
/ ^ (0[1-7] |1[0-356] |2[0-7] |3[0-6] |4[0-7] |5[1-7] |6[1-7] |7[0-5] |8[013-6])\d{4} $/Copy the code
Stock code (A-share)
(555)
/^(s[hz]|S[HZ])(000[\d]{3} |002[\d]{3} |300[\d]{3} |600[\d]{3} |60[\d]{4$/})Copy the code
Ed2k links (loose matching)
(517)
/^ed2k:\/\/\|file\|.+\|\/$/
Copy the code
A positive integer, excluding 0
(504)
/ ^ \ +? [1-9]\d*$/
Copy the code
Base64 format
(500)
/^\s*data:(? :[a-z]+\/[a-z0-9+ - +.] (? :; [a-z-]+=[a-z0-9-] +)? ? (? :; base64)? ,([a-z0-9! $&', () * +; = \ -. _ ~ : @ /? %\s]*?) \s*$/iCopy the code
Email (Chinese email address is supported)
(478)
/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
Copy the code
Video link address (video format can be added or deleted as required)
(472)
/^https? :\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/iCopy the code
The MAC address
(463)
/^((([a-f0-9] {2{})5})|(([a-f0-9] {2{} -)5}))[a-f0-9] {2}$/i
Copy the code
Matches consecutive repeated characters
(448)
/ (.). \1+/
Copy the code
Hong Kong Identity Card
(367)
/^[a-zA-Z]\d{6}\([\dA]\)$/
Copy the code
Window “folder” path
(358)
/^[a-zA-Z]:\\(? :\w+\\?) * $/Copy the code
The value consists of lowercase letters
(346)
/^[a-z]+$/
Copy the code
Md5 format (32 bits)
(328)
/^([a-f\d]{32}|[A-F\d]{32$/})Copy the code
IP – v6 [: port]
(319)
/ (^ (? : (? : (? : [0-9A-Fa-f]{1.4{})7} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})6} :0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})5} : [[0-9A-Fa-f]{1.4} :)? [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})4} : [[0-9A-Fa-f]{1.4{})0.2} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})3} : [[0-9A-Fa-f]{1.4{})0.3} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})2} : [[0-9A-Fa-f]{1.4{})0.4} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})6}((\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b)\.) {3}(\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b))|(([0-9A-Fa-f]{1.4{})0.5}:((\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b)\.) {3}(\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b))|(::([0-9A-Fa-f]{1.4{})0.5}((\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b)\.) {3}(\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b))|([0-9A-Fa-f]{1.4} : :0-9A-Fa-f]{1.4{})0.5} [0-9A-Fa-f]{1.4}) | (: : ((0-9A-Fa-f]{1.4{})0.6} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})1.7} :)) $) | (^ \ [(? : (: (? :0-9A-Fa-f]{1.4{})7} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})6} :0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})5} : [[0-9A-Fa-f]{1.4} :)? [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})4} : [[0-9A-Fa-f]{1.4{})0.2} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})3} : [[0-9A-Fa-f]{1.4{})0.3} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})2} : [[0-9A-Fa-f]{1.4{})0.4} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})6}((\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b)\.) {3}(\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b))|(([0-9A-Fa-f]{1.4{})0.5}:((\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b)\.) {3}(\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b))|(::([0-9A-Fa-f]{1.4{})0.5}((\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b)\.) {3}(\b((25[0-5]) | (1\d{2}) | (2[0-4]\d)|(\d{1.2}))\b))|([0-9A-Fa-f]{1.4} : :0-9A-Fa-f]{1.4{})0.5} [0-9A-Fa-f]{1.4}) | (: : ((0-9A-Fa-f]{1.4{})0.6} [0-9A-Fa-f]{1.4}) | (((0-9A-Fa-f]{1.4{})1.7} :)) \] (? : : (? : [0-9"|"1-9] [0-9] {1.3} | [1-5] [0-9] {4} |6[0-4] [0-9] {3} |65[0-4] [0-9] {2} |655[0-2] [0-9] |6553[0-5))? $)/iCopy the code
Linux Folder Path
(313)
/ ^ \ / (? : [^/] + \ * $/ /)
Copy the code
Taiwan identity card
(302)
/^[a-zA-Z][0-9] {9} $/Copy the code
The Java package name
(282)
/^([a-zA-Z_]\w*)+([.][a-zA-Z_]\w*)+$/
Copy the code
Window “file” path
(271)
/^[a-zA-Z]:\\(? :\w+\\)*\w+\.\w+$/Copy the code
Linux File Path
(269)
/ ^ \ / (? : [^/] + \ [^ /] + /) * $/
Copy the code
The integer
(219)
/ ^ -? [0-9]\d*$/
Copy the code
Linux “Hidden file” path
(194)
/ ^ \ / (? : [^/] + \ \. /) * ^ / * /
Copy the code
Floating point Numbers
(153)
/ ^ (-? \d+)(\.\d+)? $/Copy the code
GUID/UUID
(145)
/^[a-f\d]{4} (? :[a-f\d]{4{} -)4}[a-f\d]{12}$/i
Copy the code
Negative integer, excluding 0
(50 times)
/ ^ -1-9]\d*$/
Copy the code
Negative integer, excluding 0
(50 times)
/ ^ -1-9]\d*$/
Copy the code
Interactive learning
Thank you for your reading. If you have any questions, you can add me to the wechat group, and I will pull you into the wechat group (Because Tencent limits the number of wechat groups to 100, when the number exceeds 100, you must be joined by group members).