17 kinds of regular expressions Date: August 15, 2003 Author: ocean2001 popular: < "? ../ Hits.asp ArticleID = 2842" script src => script> 5832 today: 7 [medium and small]
"^ // D $" // Non-negative integer (positive integer 0) "^ [0-9] * [1-9] [0-9] * $" // 正 整 "^ ((- // D ) | (0 )) $ "// Non-positive integer (negative integer 0)" ^ - [0-9] * [1-9] [0-9] * $ "// negative integer" ^ ? // d $ "// integer" ^ // D (//// D )? $ "// Non-looted number (positive floating point 0)" ^ (([0-9] // [0-9] * [1-9] *) | ([0-9] * [1-9] [0-9] * ///. [0-9] ) | [0-9] * [1-9] *)) $ "正 正 floating point number" ^ ((- // D (/// D )?) | (0 (/ /.0 )? "// Non-positive floating point number (12-9] /////////////////bit ((([0-9] * [1-9] 0-9] *) | ([0-9] * [1-9] * ///. [0-9] ) | ([0-9] * [1-9] [0 -9] *)) $ "// load point number" ^ (-? // d )? $ "// floating point number" ^ [A-ZA-Z] $ " // String "^ [AZ] $" // consisting of 26 English letters "^ [AZ] $" // consists of 26 English letters String "^ [A-ZA-Z0-9] $" // String "^ // W $" by digital and 26 English letters // consists of numbers, 26 English letters or underscores String "^ [// w -] (//. [// w -] ) * @ [// w -] (//// w -] ) $" // email Address "^ [A-ZA-Z] : // (// W // W ) *) (// W // W ) *) * (//? // S *)? $ "// URL