Hello, I am the author of any-rule (a vscode plugin). Thank you for your long-term love of any-rule. After more than 1 year of use, any-rule backend has 10w+ log records, and it’s the end of the year to share What are your favorite regulars in the past year?
https://github.com/any86/any-rule
🔥Regular TOP10
As expected, the most commonly used regularity is " mobile phone "
🚀Specific usage data
Next, let's take a look at the overall ranking of regular use in the past year.
Mobile phone number (mobile phone) China (loose), as long as it starts with 13,14,15,16,17,18,19
(12534 times)
/^(?:(?:\+|00)86)?1[3-9]\d{9}$/
Mobile phone number China (rigorous), according to the latest mobile phone number segment announced by the Ministry of Industry and Information Technology in 2019
(11382 times)
/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/
email (mailbox)
(10555 times)
/^(([^<>()[\]\\.,;:\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,}))$/
Password strength verification, at least 6 digits, including at least 1 uppercase letter, 1 lowercase letter, 1 number, 1 special character
(8118 times)
/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/
number
(7577 times)
/^\d{1,}$/
Mobile phone number (mobile phone) China (the most lenient), as long as it starts with 1. If your mobile phone number is used to receive text messages, it is recommended to choose this one first
(5899 times)
/^(?:(?:\+|00)86)?1\d{10}$/
ID number (2 generations, 18 digits), the last digit is the check digit, which may be a number or character X
(5032 times)
/^[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]$/
Mobile phone body code (IMEI)
(4889 times)
/^\d{15,17}$/
ID number, support 1/2 generation (15 digits / 18 digits)
(4266 times)
/^\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)$/
Chinese/Chinese characters
(3978 times)
/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/
Train number
(3911 times)
/^[GCDZTSPKXLY1-9]\d{1,4}$/
Chinese name
(3768 times)
/^(?:[\u4e00-\u9fa5·]{2,16})$/
User name verification, 4 to 16 digits (letters, numbers, underscores, minus signs)
(3701 times)
/^[a-zA-Z0-9_-]{4,16}$/
Number/currency amount (only supports positive numbers, does not support check thousandth separator)
(3315 times)
/(?:^[1-9]([0-9]+)?(?:\.[0-9]{1,2})?$)|(?:^(?:0)$)|(?:^[0-9]\.[0-9](?:[0-9])?$)/
12-hour system time (hh:mm:ss)
(3115 times)
/^(?:1[0-2]|0?[1-9]):[0-5]\d:[0-5]\d$/
Numbers and letters
(2559 times)
/^[A-Za-z0-9]+$/
Bank card number (10 to 30 digits, covering public/private accounts, refer to WeChat Pay )
(2395 times)
/^[1-9]\d{9,29}$/
Tel phone (domestic), such as: 0341-86091234
(2250 times)
/^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/
Unified Social Credit Code
(2174 times)
/^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/
Decimal
(2146 times)
/^\d+\.\d+$/
URL (or ip) with port number must be
(2104 times)
/^((ht|f)tps?:\/\/)?[\w-]+(\.[\w-]+)+:\d{1,5}\/?$/
Hexadecimal color
(1584 times)
/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
24-hour time (HH:mm:ss)
(1561 times)
/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/
date
(1510 times)
/^\d{1,4}(-)(1[0-2]|0?[1-9])\1(0?[1-9]|[1-2]\d|30|31)$/
Greater than or equal to 0, less than or equal to 150, supports 5 decimal places, such as 145.5, used to judge the test paper score
(1459 times)
/^150$|^(?:\d|[1-9]\d|1[0-4]\d)(?:\.5)?$/
License plate number (new energy + non-new energy)
(1372 times)
/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/
Number/currency amount (negative numbers, thousands separators are supported)
(1337 times)
/^-?\d+(,\d{3})*(\.\d{1,2})?$/
ip-v4[:port]
(1311 times)
/^((\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]))?$/
Cannot contain letters
(1267 times)
/^[^A-Za-z]*$/
Chinese and numbers
(1258 times)
/^((?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])|(\d))+$/
Unified social credit code (loose matching) (15 digits/18 digits/20 digits/letters)
(1253 times)
/^(([0-9A-Za-z]{15})|([0-9A-Za-z]{18})|([0-9A-Za-z]{20}))$/
html tags (loose matching)
(1133 times)
/<(\w+)[^>]*>(.*?<\/\1>)?/
Thunder Link
(1106 times)
/^thunderx?:\/\/[a-zA-Z\d]+=$/
qq number format is correct
(1103 times)
/^[1-9][0-9]{4,10}$/
It is composed of numbers and English letters, and contains both numbers and English letters
(1073 times)
/^(?=.*[a-zA-Z])(?=.*\d).+$/
Picture (image) link address (picture format can be added or deleted as needed)
(1057 times)
/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i
Whether the account number is legal (beginning with a letter, allowing 5-16 bytes, allowing alphanumeric underscore combinations
(975 times)
/^[a-zA-Z]\w{4,15}$/
Macau ID card
(967 times)
/^[1|5|7]\d{6}\(\d\)$/
Uppercase english letters
(939 times)
/^[A-Z]+$/
WeChat ID (wx), 6 to 20 digits, starting with a letter, letter, number, minus sign, underscore
(900 times)
/^[a-zA-Z][-_a-zA-Z0-9]{5,19}$/
English alphabet
(890 times)
/^[a-zA-Z]+$/
License plate number (non-new energy)
(852 times)
/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$/
License plate number (new energy)
(813 times)
/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][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-9挂学警港澳])$/
ID number (1 generation, 15 digits)
(809 times)
/^[1-9]\d{7}(?:0\d|10|11|12)(?:0[1-9]|[1-2][\d]|30|31)\d{3}$/
Passport (including Hong Kong and Macau)
(724 times)
/(^[EeKkGgDdSsPpHh]\d{8}$)|(^(([Ee][a-fA-F])|([DdSsPp][Ee])|([Kk][Jj])|([Mm][Aa])|(1[45]))\d{7}$)/
The version number (version) format must be XYZ
(706 times)
/^\d+(?:\.\d+){2}$/
html comment
(704 times)
/<!--[\s\S]*?-->/g
English name
(703 times)
/(^[a-zA-Z][a-zA-Z\s]{0,20}[a-zA-Z]$)/
Magnet link (loose matching)
(692 times)
/^magnet:\?xt=urn:btih:[0-9a-fA-F]{40,}.*$/
Postal Code (China)
(569 times)
/^(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}$/
Stock code (A shares)
(555 times)
/^(s[hz]|S[HZ])(000[\d]{3}|002[\d]{3}|300[\d]{3}|600[\d]{3}|60[\d]{4})$/
ed2k link (loose matching)
(517 times)
/^ed2k:\/\/\|file\|.+\|\/$/
Positive integer, excluding 0
(504 times)
/^\+?[1-9]\d*$/
base64 format
(500 times)
/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i
email (support Chinese email)
(478 times)
/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
Video link address (video format can be added or deleted as needed)
(472 times)
/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i
mac address
(463 times)
/^((([a-f0-9]{2}:){5})|(([a-f0-9]{2}-){5}))[a-f0-9]{2}$/i
Match consecutive repeated characters
(448 times)
/(.)\1+/
Hong Kong Identity Card
(367 times)
/^[a-zA-Z]\d{6}\([\dA]\)$/
window "folder" path
(358 times)
/^[a-zA-Z]:\\(?:\w+\\?)*$/
Composition of lowercase English letters
(346 times)
/^[a-z]+$/
md5 format (32 bits)
(328 times)
/^([a-f\d]{32}|[A-F\d]{32})$/
ip-v6[:port]
(319 times)
/(^(?:(?:(?:[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]))?$)/i
linux folder path
(313 times)
/^\/(?:[^/]+\/)*$/
Taiwan ID card
(302 times)
/^[a-zA-Z][0-9]{9}$/
java package name
(282 times)
/^([a-zA-Z_]\w*)+([.][a-zA-Z_]\w*)+$/
"File" path under window
(271 times)
/^[a-zA-Z]:\\(?:\w+\\)*\w+\.\w+$/
linux file path
(269 times)
/^\/(?:[^/]+\/)*[^/]+$/
Integer
(219 times)
/^-?[0-9]\d*$/
linux "hidden file" path
(194 times)
/^\/(?:[^/]+\/)*\.[^/]*/
Floating point
(153 times)
/^(-?\d+)(\.\d+)?$/
GUID/UUID
(145 times)
/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i
Negative integer, excluding 0
(50 times)
/^-[1-9]\d*$/
Negative integer, excluding 0
(50 times)
/^-[1-9]\d*$/
Learning interaction
Thank you for reading. If you have any questions, you can add me to WeChat. I will pull you into the WeChat group (due to Tencent’s 100-person limit on WeChat groups, after more than 100 people must be pulled in by group members)
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。