Common regular expression

zhaozj2021-02-16  70

(/ D {3} - | / d {4} -)? (/ d {8} | / d {7})? // Domestic phone

^ [1-9] * [1-9] [0-9] * $ // Tencent QQ

"^ [// w -] (//. [// w -] ) * @ [// w -] (//. [// w -] ) $" // email address

"^ [a-za-z] : // (// w // w ) *) (// w // w ) *) * (//? // s *)? $ "// URL

"^ // D $" // Non-negative integer

"^ [0-9] * [1-9] [0-9] * $" // positive integer

"^ (((- // D ) | (0 )) $" // Non-integer

"^ - [0-9] * [1-9] [0-9] * $" // negative

"^ -? // D $" // integer

"^ // D (//.// D )? $" // Non-looted

"^ (([0-9] //. [0-9] * [1-9] [0-9] *) | ([0-9] * [1-9] [0-9] * //.[0-9] )| ([0-9]*[1-9][0-9]*) "$" // Positive floating point number

"^ ((((- // D (//// D )?) | (0 (//. 0 )?)) $" // Non-positively floating point

"^ (((((((((((([0-9] //. [0-9] * [1-9] *) | ([0-9] * [1-9] [0-9 ] * //. [0-9] ) | ([0-9] * [1-9] [0-9] *))) $ "// load floating point number

"^ (-? // d )? $" // floating point number

"^ [A-ZA-Z] $" // String consisting of 26 English letters

"^ [A-Z] $" // String consisting of 26 English letters

"^ [A-Z] $" // String consisting of 26 English letters

"^ [A-ZA-Z0-9] $" // String consisting of numbers and 26 English letters

"^ // w $" // string consisting of numbers, 26 English letters or underlined

转载请注明原文地址:https://www.9cbs.com/read-13033.html

New Post(0)