Record some common regular expressions

Email: / ^] [A Za - z \ d + ([- _.]] [A Za - z \ d +) * @ ([A Za - z \ d] + [-]) + [A Za - z \ d] {2, 4} $/ cell phone number: / ^ 1 {1} [0 | 3 | 4 5 6 7 | | | | | 8, 9] {1} [0-9] {9} $/ phone number: / ^ \ d {7, 12} $/ two decimal places: / ^ [0-9] + (. [0-9] {1, 2})? $/ float: /^(-? \d+)(\.\d+)? $/ Password (contains 6 to 20 letters and digits): /^(? ! ([0-9] + $)? ! [a zA - Z] + $) [0-9 a zA - Z] 6, 20} {$/ id card (simple 15 pure digital or 18 in digital/X/X at the end of the string) : / (^ \ d {15} $) | (^ \ d {and} [xx] 0-9 $)/user name (only allow alphanumeric characters) : /^[a-za-z0-9 \u4e00-\u9fa5]+$/ Positive integer: /^(\d+)$/Copy the code

.