RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 2
Title Test Details Typical Email Expression
Expression
(".+"\s)?<?[a-z\._0-9]+[^\._]@([a-z0-9]+\.)+[a-z0-9]{2,6}>?;?
Description
Simple email matching expression, that allows for a friendly name string similar to what you see in outlook 2007. Example: "Test User" [email protected]
Matches
Non-Matches
Author Rating: Not yet rated. Mitchell Lee
Title Test Details Versitile North American Phone Number Validation
Expression
[\+]?[\s]?(\d(\-|\s)?)?(\(\d{3}\)\s?|\d{3}\-?)\d{3}(-|\s-\s)?\d{4}(\s(ex|ext)\s?\d+)?
Description
My goal with this was to have a pretty loose and flexible validation, accept a number of different input strings, but still inforce the core of what a phone number is. Country Code optional, Area Code required, with optional extension as well for business numbers. I'm still fairly new to Regex's so any suggestions for improvement are great.
Matches
+12345678910 | +1 (234)567-8910 | (234)567-8910 | 2345678910 | 234-567-8910 | 1-888-666-1111 ext 123 | 1-999-555-3333 ex 123
Non-Matches
1234567891011 | 555-(123)-4567 | 123-4567
Author Rating: Not yet rated. Mitchell Lee
   Displaying page 1 of 1 pages; Items 1 to 2

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials