1. Account number
Rules: Letters, numbers, underscores, letters beginning with 4-16 digits.
Expression:/^[a-za-z]\w{3,15}$/;
2. Mobile phone number
Rule: 11 digits, starting with 1
Expression:/^1\d{10}$/
3. Phone number
Rules: Area code + number, area code starts with 0, 3-bit or 4-digit number consists of 7-or 8-digit numbers that can have no connector between the area code and the number, or "-" connection
An expression: /^0\d{2,3}-?\d{7,8}$/
4. Email
Rule: Leave your email address in the "first part @ Second part"
The first part: By letter, number, underline, short line "-", Dot "." Composition
Part Two: For a domain name, the domain name consists of letters, numbers, short-term "-", the domain name suffix , and the domain name suffix is generally. xxx or. xxx.xx, a domain name suffix is generally 2-4-bit, such as cn,com,net, now the domain name will be more than 4 bit
An expression: /^ (\w-*\.*) [email protected] (\w-?) + (\.\w{2,}) +$/
JS Regular expression Verification account mobile phone number phone e-mail