Summary of regular expressions for JQuery numeric type verification
This article mainly explains the "commonly used JQuery digital type verification regular expression summary", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "commonly used JQuery digital type verification regular expression summary" bar!
The copy code is as follows:
Var regexEnum =
{
Intege: "^ -? [1-9] / / dice $", / / integer
Intege1: "^ [1-9] / / integer $", / / positive integer
Intege2: "^-[1-9] / / negative integer
Num: "^ ([+ -]?) / / the number of the number.
Num1: "^ ([1-9] / / d * | 0) $", / / positive number (positive integer + 0)
Num2: "^-[1-9] / / d * | 0 $", / / negative number (negative integer + 0)
Decmal: "^ ([+ -]?) / / dancelash. Universe $", / / floating point number
Decmal1: "^ [1-9] / / positive floating point number
Decmal2: "^-([1-9] / / dink. Raceme d* | 0.Uniqqr d* [1-9] / / d*) $", / / negative floating point number
Decmal3: "^ -? ([1-9] / / dabbr. Uniqqd* | 0) $", / / floating-point number.
Decmal4: "^ [1-9] / / daub. Universe DX | 0.Unix DX [1-9] / / d* | 0. 0 + | 0 $", / / non-negative floating point number (positive floating point + 0)
Decmal5: "^ (- ([1-9] / / daub. Uniqqd* | 0. Universe d* [1-9] / / d*)) | 0. 0 + | 0 $", / / non-positive floating point (negative floating point + 0)
Email: "^ / / w+ ((- / / w+) | (/ /. / / w+)) * / / @ [A-Za-z0-9] + ((/ /. | -) [A-Za-z0-9] +) * /. [A-Za-z0-9] + $", / / email
Color: "^ [a-fA-F0-9] {6} $", / / Color
Url: "^ http [s]?: / ([/ / w -] + / /.) + [/ / w -] + ([/ / wmur.Universe% accounts =] *)? $", / / url
Chinese: "^ [/ / u4E00-//u9FA5//uF900-//uFA2D] + $", / / Chinese only
Ascii: "^ [/ / x00-//xFF] + $", / / ACSII characters only
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: "^ / / saved $", / / is 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 {1jue 2} / / 1ax d {1pm 2} $", / / date
Qq: "^ [1-9] * [1-9] [0-9] * $", / / QQ number
Tel: "(([0pacpacpacer +] / / d {2pr 3} -)? (0Accord d {2pr 3}) -)? (/ / d {7pm 8}) (- (/ d {3,}))? $", / / function of the phone number (including verifying domestic area code, international area code, extension number)
Username: "^ / / walled $", / / is used for user registration. Matches a string consisting of numbers, 26 letters, or underscores
Letter: "^ [A-Za-z] + $", / / letter
Letter_u: "^ [Amurz] + $", / / uppercase letters
Letter_l: "^ [amerz] + $", / / lowercase letters
Idcard: "^ [1-9] ([0-9] {14} | [0-9] {17}) $" / / ID card
}
Thank you for your reading, the above is the "commonly used JQuery digital type verification regular expression summary" content, after the study of this article, I believe you on the commonly used JQuery digital type verification regular expression summary of this problem has a deeper understanding, the specific use of the need for you to practice verification. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!