Note the regular expressions used in the project to pass the test, memo.
1.
Rules: 4-30 for characters, numbers including "-", "_" special characters
Regular: ^[0-9-_a-za-z]{4,30}$
2.
Rule: 6-20-bit characters, including at least two of letters and numbers, and case-sensitive
Regular: ^ (?! [a-za-z]+$) (?! [0-9]+$] [a-za-z0-9]{6,20}$
3.
Rule: integer multiples of 100
Regular: ^[1-9][0-9]*0{2}$
4. Mobile phone number
Rule: First place is 1, total 11 bits
Regular: ^1\d{10}$
Rule: 11 digits
Regular: ^\d{11}$
5. Non-null judgment
Rule: input cannot be empty
Regular: ^[^\\s]+$
6.
Rule: 8-20 digits consist of numbers, letters, underscores, punctuation, must contain numbers and letters, and cannot contain Chinese or full-width characters
Regular: ^ (?! [a-za-z]+$) (?! [0-9]+$] [a-za-z1-9\u0000-\u00ff]{8,20}$
7.
Rule: up to 14 digits and cannot be 0 (up to 3 digits after the decimal point)
Regular: (?! ^0$) (?! ^[0]{2,}) (?! ^0[1-9]+) (?! ^0\. [0]*$) ^\d{1,10} (\.\d{1,3})? $
8.
Rule: cannot contain decimals
Regular: (?! ^0*$) ^\d{1,14}$|^[0-9{1,2} (, [0-9{3}) {0,4}$|^[0-9{1,3} (, [0-9{3}) {0,3}$
9.
Rule: cannot be less than 0.01 (up to two decimal places after the decimal point)
Regular: (?! ^0$) (?! ^[0]{2,}) (?! ^0[1-9]+) (?! ^0\. [0]*$] ^ (([1-9]+[0-9]*) | (\.\d{1,2})? $
10.
Rule: Enter an integer greater than or equal to 100
Regular: ^[1-9]+[0-9]+[0-9]+$
11.
Rule: up to 14 digits (up to 2 digits after the decimal point) can be 0
Regular: (?! ^[0]{2,}) (?! ^0[1-9]+) (?! ^\. [0]*$) ^\d{1,11} (\.\d{1,2})? $
Welcome to add, discuss.
Java Common Regular Expression backup