当前位置:网站首页>Want to go whoring for nothing, right? Enough for you this time!
Want to go whoring for nothing, right? Enough for you this time!
2022-07-18 02:24:00 【InfoQ】
^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$
Number related
- cell-phone number ( With 1 start ):
/^(?:(?:\+|00)86)?1\d{10}$/
- cell-phone number ( With 13 to 19 start ):
/^(?:(?:\+|00)86)?1[3-9]\d{9}$/
- cell-phone number ( Start with the mobile phone number segment published by the Ministry of industry and information technology ):
/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/
- Domestic fixed line number :
/\d{3}-\d{8}|\d{4}-\d{7}/
- Mail box number :
/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
- Postal Code :
/[1-9]\d{5}(?!\d)/
- ID number :
/^[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]$/
- Bank card number ( Male 、 Private account ):
/^[1-9]\d{9,29}$/
- license plate number :
/^[ Beijing, Tianjin, Shanghai, Chongqing, Hebei, Henan, Yunnan, Liaoning, Heilongjiang, Hunan, Anhui, Shandong, new Jiangsu, Zhejiang, Jiangxi, Hubei, Guangxi, Gansu, Shanxi, Inner Mongolia, Shaanxi, Jilin, Fujian, Guizhou, Guangdong, Qinghai Tibet, Sichuan, Ningxia and Hainan ][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9 Hang the school police in Hong Kong and Macao ]$/
- QQ Number :
/^[1-9][0-9]{4,10}$/
- WeChat ID :
/^[a-zA-Z][-_a-zA-Z0-9]{5,19}$/
- Version number ( x.y.z ):
/^\d+(?:\.\d+){2}$/
- Legal account 1( Beginning of letter ,5-16 position , Allow alphanumeric underscores ):
/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/
- Legal account 2(4-16 position , Allow letters , Numbers , Underline , minus sign ):
/^[a-zA-Z0-9_-]{4,16}$/
- Strong password 1( Must contain a combination of upper and lower case letters and numbers , Special characters cannot be used , The length is in 8-10 Between ):
/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,10}$/
- Strong password 2( Must contain letters 、 Numbers 、 Special characters :*@#$%^&`~()-+=):
/^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\[email protected]#$%^&* ~()-+=]+$)(?![a-z0-9]+$)(?![a-z\\[email protected]#$%^& *~()-+=]+$)(?![0-9\[email protected]#$%^&* ~()-+=]+$)[a-zA-Z0-9\\[email protected]#$%^&*~()-+=]/- website :
/^(((ht|f)tps?):\/\/)?(^[email protected]#$%^&*?.\s-?\.)+[a-z]{2,6}\/?/
- The website has a port number :
/^((ht|f)tps?:\/\/)?[\w-]+(\.[\w-]+)+:\d{1,5}\/?$/
- ip-v4:
/\\b(?:(?: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]?)\\b/
- ip-v6:
/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/
Numbers are relevant
- Only numbers :
/^[0-9]*$/or/^\d{1,}$/
- Integers :
/^-?[0-9]\d*$/
- Positive integer :
/^\+?[1-9]\d*$/
- Non positive integer :
/^-[1-9]\d*|0$/
- Negtive integer :
/^-[1-9]\d*$/
- Non-negative integer :
/^\d+$/
- Floating point numbers :
/^(-?\d+)(\.\d+)?$/
- Positive floating point :
/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/
- Negative floating point number :
/^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)/
- decimal :
/^-?\d+\.\d+$/
- Positive numbers / negative / decimal :
/^(\-|\+)?\d+(\.\d+)?$/
- Positive real numbers are kept after the decimal point 2 position :
/^[0-9]+(.[0-9]{2})?$/
- Positive real numbers are kept after the decimal point 1 To 3 position :
/^[0-9]+(.[0-9]{1,3})?$/
- n Digit number :
/^\d{n}$/
- At least n Digit number :
/^\d{n,}$/
- m to n Digit number :
/^\d{m,n}$/
- Numbers and letters contain at least one :
/^[A-Za-z0-9]+$/
- Must contain numbers and letters :
/^(?=.*[a-zA-Z])(?=.*\d).+$/
- md5 value :
/^([a-f\d]{32}|[A-F\d]{32})$/
- base64 value :
/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i
Character related
- m to n A character :
/^.{3,20}$/
- Alphabetic characters :
/^[A-Za-z]+$/
- Capitalized English alphabetic characters :
/^[A-Z]+$/
- Lowercase English alphabetic characters :
/^[a-z]+$/
- Chinese characters :
/^[\u4e00-\u9fa5]{0,}$/
- Full angle symbol :
/[\uFF00-\uFFFF]/
- Half angle symbol :
/[\u0000-\u00FF]/
- Chinese characters 、 english 、 Numbers 、 Underline at least one :
/^[\u4E00-\u9FA5A-Za-z0-9_]+$/
- Does not contain characters “~” :
/[^~\x22]+/
- Characters repeat continuously :
/(.)\1+/
Time related
- 24 Hour time (HH:mm:ss):
/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/
- 12 Hour time (hh:mm:ss):
/^(?:1[0-2]|0?[1-9]):[0-5]\d:[0-5]\d$/
- 24 Hour time (HHmmss):
/([0-1]?[0-9]|2[0-3])([0-5][0-9])([0-5][0-9])$/
- date 1(yyyy-MM-dd, Such as 2222-01-01, The year must be 4 position ):
/^\d{4}-\d{1,2}-\d{1,2}/
- date 2( Such as 333-01-01, The year can be less than 4 position ):
/^\d{1,4}(-)(1[0-2]|0?[1-9])\1(0?[1-9]|[1-2]\d|30|31)$/
- date 3(yyyyMMdd, Such as 20220202):
/^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})(((0[13578]|1[02])(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)(0[1-9]|[12][0-9]|30))|(02(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))0229))$/
- date + Time 1(YYYYMMDD HH:mm:ss):
/^\d{4}([/:-\S])(1[0-2]|0?[1-9])\1(0?[1-9]|[1-2]\d|30|31) (?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/
- date + Time 2:
/^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
- A year 12 Months ((01~09 or 1~12)):
/^(0?[1-9]|1[0-2])$/
- A month 31 God (01~09 or 1~31):
/^((0?[1-9])|((1|2)[0-9])|30|31)$/
- Yes 31 Day's month :
/^(0?[13578]|1[02])$/
- Yes 30 Days and months :
/(0[469]|11)-(0[1-9]|[12][0-9]|30)/
- 2 month 28 God ("02-28"):
/^02-(0[1-9]|[1][0-9]|2[0-8])$/
- Leap year :
/^(((19|20)([13579][26]|[2468][048]|0[48]))|(2000))$/
- Leap year 2 month ( such as 2008-02-01):
/^(((19|20)([13579][26]|[2468][048]|0[48]))|(2000))-0?2-(0?[1-9]|[12]\d)$/
- date ( Including leap years 、 Judgment of big and small months ):
/((((19|20)\d{2})-(0?(1|[3-9])|1[012])-(0?[1-9]|[12]\d|30))|(((19|20)\d{2})-(0?[13578]|1[02])-31)|(((19|20)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))-0?2-29))$/
- Year range - year ( such as 19 - 20 year ):
/^((19|20)\d{2})$/
- Year range - years ( such as 1999-01):
/^((((19|20)\d{2})-(0?[13-9]|1[012]))|(((19|20)\d{2})-(0?[13578]|1[02]))|(((19|20)\d{2})-0?2)|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))-0?2))$/
- Year range - Specific date ( such as 1999-01-01):
/^((((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})-0?2-(0?[1-9]|1\d|2[0-8]))|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))-0?2-29))$/.test('2021-02-21')$/
- Year range - Specific date ( The interval symbol can be - / Or empty ):
/^(?:(?:1[6-9]|[2-9][0-9])[0-9]{2}([-/.]?)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:(?:1[6-9]|[2-9][0-9])(?:0[48]|[2468][048]|[13579][26])|(?:16|[2468][048]|[3579][26])00)([-/.]?)0?2\2(?:29))$/
Programming related
- 16 Binary color :
/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
- Extract web page color code :
/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/
- Video link address :
/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i
- Picture link address :
/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i
- mac Address :
/^((([a-f0-9]{2}:){5})|(([a-f0-9]{2}-){5}))[a-f0-9]{2}$/i
- Subnet mask :
/^((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))$/
- File extension validation :
/^([a-zA-Z]\\:|\\\\)\\\\([^\\\\]+\\\\)*[^\\/:*?"<>|]+\\.txt(l)?$/
- java Package name (x.x.x):
/^([a-zA-Z_]\w*)+([.][a-zA-Z_]\w*)+$/
- xml file :
/^([a-zA-Z]+-?)+[a-zA-Z0-9]+\\.[x|X][m|M][l|L]$/
- html notes :
- html label 1:
/<(\w+)[^>]*>(.*?<\/\1>)?/
- html label 2:
/<(\S*?)[^>]*>.*?</\1>|<.*? />/
- First and last white space characters :
/^\s*|\s*$/
- lookup CSS attribute :
/^\\s*[a-zA-Z\\-]+\\s*[:]{1}\\s[a-zA-Z0-9\\s.#]+[;]{1}/
- Extract page hyperlinks :
/(<a\\s*(?!.*\\brel=)[^>]*)(href="https?:\\/\\/)((?!(?:(?:www\\.)?'.implode('|(?:www\\.)?', $follow_list).'))[^" rel="external nofollow" ]+)"((?!.*\\brel=)[^>]*)(?:[^>]*)>/
- Take pictures of web pages :
/\\< *[img][^\\\\>]*[src] *= *[\\"\\']{0,1}([^\\"\\'\\ >]*)/
- Thunderbolt link :
/^thunder:\/\/[a-zA-Z0-9]+=$/
- ed2k link :
/^ed2k:\/\/|file|.+|\/$/
- linux" file " route :
/^\/(\w+\/)+\w+\.\w+$/
- window Next " file " route :
/^[a-zA-Z]:\\(?:\w+\\)*\w+\.\w+$/
Life related
- amount of money ( loose , It can be negative 、 The first can be 0, It supports thousand digit separation ):
/^-?\d+(,\d{3})*(\.\d{1,2})?$/
- amount of money ( Greater than 0 , Two decimal places ):
/(^[1-9]{1}[0-9]*$)|(^[0-9]*\.[0-9]{2}$)/
- amount of money ( Strictly , Not negative 、 Up to two digits after the decimal point , The first is not 0):
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/
- passport :
/(^[EeKkGgDdSsPpHh]\d{8}$)|(^(([Ee][a-fA-F])|([DdSsPp][Ee])|([Kk][Jj])|([Mm][Aa])|(1[45]))\d{7}$)/
- Hong Kong Identity Card :
/^[a-zA-Z]\d{6}\([\dA]\)$/
- Macao identity card :
/^[1|5|7]\d{6}\(\d\)$/
- Wan Wan ID card :
/^[a-zA-Z][0-9]{9}$/
- Stock code :
/^(s[hz]|S[HZ])(000[\d]{3}|002[\d]{3}|300[\d]{3}|600[\d]{3}|60[\d]{4})$/
- Not included abc 's words :
/\b((?!abc)\w)+\b/
- 100. To be continued ......
边栏推荐
- [flag] build a website around Li Jian that sorts and classifies by time axis and content (zero basis) (continuous update)
- 蛋糕可以一刀切,研发需求可以吗? | 敏捷实践
- diffusion model
- 推特大战马斯克:想走,哪那么容易
- 许式伟:Go+ 演进之路
- Install opencv environment for raspberry pie to solve no module named 'CV2'
- 自定义分页加标签封装
- Aof of redis persistence
- 职场大咖带你助攻面试求职+职业发展
- 使用scroll-view实现内容列表的竖向滚动
猜你喜欢

Crmeb Pro v1.4 makes the user experience more brilliant!

泛云桌面关键技术分析

Servlet api code example: server version confession wall

单车管理系统——1.文档设计及sql代码说明

Experiment 1 Security mechanism of SQL Server

【招募】2022向光奖|年度ESG影响力投资奖正式启动!
![[英雄星球七月集训LeetCode解题日报] 第15日 二叉树](/img/01/89e2c60fade3148ca658551ac41b23.png)
[英雄星球七月集训LeetCode解题日报] 第15日 二叉树

Baijiahao ranks well. How can the conversion rate be improved?

Container interview questions

蛋糕可以一刀切,研发需求可以吗? | 敏捷实践
随机推荐
泛云桌面关键技术分析
[question 018: how does unity understand quaternion.angleaxis?]
Summer learning plan [activities]
云呐-动环监控水浸绳,非定位水浸监测绳
实验1.SQL Server的安全机制
2020-10-26
mysql show variables 查的是哪个表里面的数据?
Golang problem summary
C # flying chess games
Xu Shiwei: la voie de l'évolution de go +.
Beijing Institute of technology - spring 2021 - Digital Logic Experiment
The domain name has been filed, and the trading is strictly controlled. Do you know?
Entity drop-down box design applicable to MES, WMS, ERP and other management systems
Matlab drawing examples
Pat brush questions
For collecting lost rights and interests, is it still worth digging into the content of enterprise stations?
CRMEB Pro v1.4,让用户体验更出彩!
暑假学习计划【活动】
STM32 and Internet of things 02 network data sending and receiving
[NLP] deepke, an open source knowledge extraction tool that supports low resources, long chapters and multimodality