Intelligently generate and explain regular expressions, supporting various common pattern matching
Convert your text instructions into formulas or input a formula to have it explained.
Edit Excel online by chatting with AI
Convert your text instructions into SQL queries - powered by AI.
Generate Excel VBA (Visual Basic for Applications) code to automate tasks and create custom solutions within Microsoft Excel.
Upload your Excel file and generate beautiful charts with our AI-powered chart generator.
Convert your text into beautiful mind maps with our AI-powered mind map generator. Edit and customize your mind maps easily.
Use AI to intelligently generate and explain regular expressions, supporting various text pattern matching and data validation.
# Comprehensive Tutorial on Regular Expressions for Global ID Card (ID Card) Number Matching
In the formats of ID Numbers across different countries globally, the structure varies. This tutorial compiles regular expression matching rules for ID cards of many countries, applicable to scenarios like form validation, data scraping, user information processing, etc., helping developers quickly and accurately identify ID card number formats from various countries.
---
## 🧩 Mainland China (PRC)
```regex
^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$
^[A-Z]{1,2}\d{6}\([0-9A]\)$
^[157][0-9]{6}\([0-9]\)$
^[A-Z][12]\d{8}$
^\d{3}-\d{2}-\d{4}$
^[A-CEGHJ-PR-TW-Z]{2}\d{6}[A-D]$
^\d{12}$
^\d{6}-[1-4]\d{6}$
^[STFG]\d{7}[A-Z]$
^\d{6}-\d{2}-\d{4}$
^\d{4}\s\d{4}\s\d{4}$
^\d{3}-\d{3}-\d{3}$
^\d{4}\s\d{5}\s\d{1}$
^[A-Z0-9\-\(\)\s]{5,20}$
Global ID Card Regular Expressions, ID Card Format Guide, ID Number Validation Rules, ID Card Regex Patterns, Regex for National ID Numbers, Complete Guide to ID Card Number Regular Expressions, International ID Card Format Matching, ID Recognition Regex, Validation of ID Cards from Various Countries, Regex ID Number Validation Table
The above regular expressions are for basic format validation only. In actual scenarios, please combine them with the legality validation rules of each country’s ID cards (such as Luhn algorithm, date of birth validity, etc.) to ensure completeness.