Regular Expression application, Regular Expression

Source: Internet
Author: User

Regular Expression application, Regular Expression

1 decma: "^ ([+-]?) \ D *\\. \ d + $ ", // floating point number 2 decma1:" ^ [1-9] \ d *. \ d * | 0. \ d * [1-9] \ d * $ ", // Positive floating point number 3 decma2:" ^-([1-9] \ d *. \ d * | 0. \ d * [1-9] \ d *) $ ", // negative floating point number 4 decma3:" ^ -? ([1-9] \ d *. \ d * | 0. \ d * [1-9] \ d * | 0 ?. 0 + | 0) $ ", // floating point number 5 decma4:" ^ [1-9] \ d *. \ d * | 0. \ d * [1-9] \ d * | 0 ?. 0 + | 0 $ ", // non-negative floating point number (Positive floating point number + 0) 6 decma6:" ^ (-([1-9] \ d *. \ d * | 0. \ d * [1-9] \ d *) | 0 ?. 0 + | 0 $ ", // non-Positive floating point number (negative floating point number + 0) 7 intege:" ^ -? [1-9] \ d * $ ", // integer 8 intege1:" ^ [1-9] \ d * $ ", // positive integer 9 intege2: "^-[1-9] \ d * $", // negative integer 10 num: "^ ([+-]?) \ D *\\.? \ D + $ ", // number 11 num1:" ^ [1-9] \ d * | 0 $ ", // positive number (positive integer + 0) 12 num2: "^-[1-9] \ d * | 0 $", // negative (negative integer + 0) 13 ascii: "^ [\ x00-\ xFF] + $", // only acⅱ characters 14 chinese: "^ [\ u4e00-\ u9fa5] + $ ", // only Chinese 15 color: "^ [a-fA-F0-9] {6} $", // color 16 date: "^ \ d {4} (\-| \/| \.) \ d {1, 2} \ 1 \ d {1, 2} $ ", // Date 17 email:" ^ \ w + (-\ w +) | (\\. \ w +) * \ @ [A-Za-z0-9] + ((\\. |-) [A-Za-z0-9] + )*\\. [A-Za-z0-9] + $ ", // email 18 idcard:" ^ [1-9] ([0-9] {14} | [0-9] {17}) $ ", // ID card 19 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 20 letter:" ^ [A-Za-z] + $ ", // letter letter_l: "^ [a-z] + $", // lowercase letter 21 letter_u: "^ [A-Z] + $", // uppercase letter 22 mobile: "^ 0? (13 | 15 | 17 | 18 | 14) [0-9] {9} $ ", // mobile phone 23 notempty:" ^ \ S + $ ", // non-empty 24 password: "^. * [A-Za-z0-9 \ w _-] +. * $ ", // password 25 fullNumber:" ^ [0-9] + $ ", // Number 26 picture :"(. *)\\. (jpg | bmp | gif | ico | pcx | jpeg | tif | png | raw | tga) $ ", // image 27 qq: "^ [1-9] * [1-9] [0-9] * $", // QQ number 28 rar :"(. *)\\. (rar | zip | 7zip | tgz) $ ", // compressed file 29 tel:" ^ [0-9 \-()] {7, 18} $ ", // phone number function (including domestic area code, international area code, extension code) 30 url: "^ http [s]?: \/([\ W-] + \.) + [\ w-] + ([\ w -./? % & =] *)? $ ", // Url 31 username:" ^ [A-Za-z0-9 _ \-\ u4e00-\ u9fa5] + $ ", // username 32 deptname: "^ [A-Za-z0-9 _ () \-\ u4e00-\ u9fa5] + $", // unit name 33 zipcode: "^ \ d {6} $", // zip code realname: "^ [A-Za-z \ u4e00-\ u9fa5] + $ ", // real name 34 ompanyname: "^ [A-Za-z0-9 _ () \-\ u4e00-\ u9fa5] + $", // company name 35 ompanyaddr: "^ [A-Za-z0-9 _ () \ # \-\ u4e00-\ u9fa5] + $", // company address 36 ompanysite: "^ http [s]?: \/([\ W-] + \.) + [\ w-] + ([\ w -./? % & # =] *)? $ ", // Company website

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.