日期:2013-01-10  浏览次数:20417 次

Expression:  ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})|([a-zA-Z0-9\-\.]+))\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$  Rating: 10 [ Rate]  
Description:   Email validator that adheres directly to the specification for email address naming. It allows for ...  
Matches:  [asmith@mactec.com], [foo12@foo.edu], [bob.smith@foo.tv]  [ More Details]  
Non-Matches:  [joe], [@foo.com], [a@a]  [ Test Expression]  
Submitted By:  Andy Smith (asmith@mactec.com)  

Expression:  ^\d{1,2}\/\d{1,2}\/\d{4}$  Rating: 4 [ Rate]  
Description:   This regular expressions matches dates of the form XX/XX/YYYY where XX can be 1 or 2 digits long an...  
Matches:  [4/1/2001], [12/12/2001], [55/5/3434]  [ More Details]  
Non-Matches:  [1/1/01], [12 Jan 01], [1-1-2001]  [ Test Expression]  
Submitted By:  Steven Smith (ssmith@aspalliance.com)  

Expression:  ^[a-zA-Z]{1,2}[1-9][0-9]{0,1} {0,1}[1-9][A-Za-z]{2}$  Rating: 4 [ Rate]  
Description:   Matches UK postcodes  
Matches:  [G1 1AA], [EH10 2QQ], [SW1 1ZZ]  [ More Details]  
Non-Matches:  [G111 1AA], [X10 WW], [DDD 5WW]  [ Test Expression]  
Submitted By:  Dave Sparks (dave.sparks@cedalion.co.uk)  

Expression:  /\*[\d\D]*?\*/  Rating: 2 [ Rate]  
Description:   If you need to extract or remove any /* */ sytle comments from any Java, JavaScript, C, C++, CSS, e...  
Matches:  [/* my comment */], [/* my multiline comment */], [/* my nested comment */]  [ More Details]  
Non-Matches:  [*/ anything here /*], [anything between 2 seperate comments], [\* *\]  [ Test Expression]  
Submitted By:  Chris Craft (cjcraft@mail.com)  

Expression:  ^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$  Rating: 2 [ Rate]  
Description:   This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZI...  
Matches:  [44240], [44240-5555], [G3H 6A3]  [ More Details]  
Non-Matches:  [Ohio], [abc], [g3h6a3]  [ Test Expression]  
Submitted By:  Steven Smith (ssmith@aspalliance.com)  

Expression:  ^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$  Rating: 2 [ Rate]  
Description:   RegExp for validating the format of IP Addresses. This works great with the ASP.NET RegularExpressi...  
Matches:  [127.0.0.1], [255.255.255.0], [192.168.0.1]  [ More Details]  
Non-Matches:  [1200.5.4.3], [abc.def.ghi.jkl], [255.foo.bar.1]  [ Test Expression]  
Submitted By:  G. Andrew Duthie (graymad@att.net)  

Expression:  ^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$  Rating: 2 [ Rate]  
Description:   Email validation. With this short expression you can validate for proper email format. It's short...  
Matches:  [bob-smith@foo.com], [bob.smith@foo.com], [bob_smith@foo.com]  [ More Details]  
Non-Matches:  [-smith@foo.com], [.smith@foo.com],