Var regexEnum =
{
Intege: "^ -? [1-9] // d * $ ", // integer
Intege1: "^ [1-9] // d * $", // positive integer
Intege2: "^-[1-9] // d * $", // negative integer
Num: "^ ([+-]?) // D *//.? // D + $ ", // number
Num1: "^ ([1-9] // d * | 0) $", // positive integer (positive integer + 0)
Num2: "^-[1-9] // d * | 0 $", // negative (negative integer + 0)
Decmal: "^ ([+-]?) // D * //. // d + $ ", // floating point number
Decmal1: "^ [1-9] // d *. // d * | 0. // d * [1-9] // d * $ ", // Positive floating point number
Decmal: "^-([1-9] // d *. // d * | 0. // d * [1-9] // d *) $ ", // negative floating point number
Decm_3: "^ -? ([1-9] // d *. // d * | 0. // d * [1-9] // d * | 0 ?. 0 + | 0) $ ", // floating point number
Decmal4: "^ [1-9] // d *. // d * | 0. // d * [1-9] // d * | 0 ?. 0 + | 0 $ ", // non-negative floating point number (Positive floating point number + 0)
Decmal5: "^ (-([1-9] // d *. // d * | 0. // d * [1-9] // d *) | 0 ?. 0 + | 0 $ ", // non-Positive floating point number (negative floating point number + 0)
Email: "^ // w + (-// w +) | (//. // w +) * // @ [A-Za-z0-9] + ((//. |-) [A-Za-z0-9] + )*//. [A-Za-z0-9] + $ ", // mail
Color: "^ [a-fA-F0-9] {6} $", // color
Url: "^ http [s]? : // ([// W-] + //.) + [// w-] + ([// w -./? % & =] *)? $ ", // Url
Chinese: "^ [// u4E00-// u9FA5 // uF900-// uFA2D] + $", // only chinese
Ascii: "^ [// x00-// xFF] + $", // It is only an acⅱ character.
Zipcode: "^ // d {6} $", // zip code
Mobile: "^ (13 | 15 | 18) [0-9] {9} $", // mobile phone
Ip4: "^ (25 [0-5] | 2 [0-4] // d | [0-1] // d {2} | [1-9]? // D )//. (25 [0-5] | 2 [0-4] // d | [0-1] // d {2} | [1-9]? // D )//. (25 [0-5] | 2 [0-4] // d | [0-1] // d {2} | [1-9]? // D )//. (25 [0-5] | 2 [0-4] // d | [0-1] // d {2} | [1-9]? // D) $ ", // ip address
Notempty: "^/S + $", // not empty
Picture: "(. *) //. (jpg | bmp | gif | ico | pcx | jpeg | tif | png | raw | tga) $", // picture
Rar: "(. *) //. (rar | zip | 7zip | tgz) $", // compress the file
Date: "^ // d {4} (//-| // | /.) // d {1, 2} // 1 // d {1, 2} $ ", // Date
Qq: "^ [1-9] * [1-9] [0-9] * $", // qq number
Tel: "^ ([0 // +] // d {2, 3 }-)? (0 // d {2, 3 })-)? (// D {7, 8}) (-(// d {3 ,}))? $ ", // Phone number function (including domestic area code, international area code, and extension code)
Username: "^ // w + $", // used for user registration. Match a string consisting of digits, 26 English letters, or underscores
Letter: "^ [A-Za-z] + $", // letter
Letter_u: "^ [A-Z] + $", // uppercase letter
Letter_l: "^ [a-z] + $", // lowercase letter
Idcard: "^ [1-9] ([0-9] {14} | [0-9] {17}) $" // ID card
}