Practical Regular Expressions
Match the line containing a specific string (string
):
Strict mobile phone number:
Loose mobile phone number:
Domestic landline phone number:
Landline phone number (including Hong Kong, Macau, and Taiwan):
Email address:
/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](https://github.com/wqjiao/regular-set/blob/master?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](https://github.com/wqjiao/regular-set/blob/master?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
ID card number:
Passport number (including Hong Kong and Macau):
License plate number (new energy + non-new energy):
/^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 A-Z]{1}[A-HJ-NP-Z]{1}(([0-9]{5}[DF])|([DF](https://github.com/wqjiao/regular-set/blob/master/[A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9 挂学警港澳]{1})$/
New energy license plate number:
/[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 A-Z]{1}[A-HJ-NP-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$/
Non-new energy license plate number:
Vehicle identification number:
Engine number:
Chinese postal code:
Allow alphanumeric and underscore combinations:
Chinese characters:
English letters:
Numbers:
Decimal numbers:
Cannot contain Chinese characters:
This post is translated using ChatGPT, please feedback if any omissions.