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 Single Email Match - current June 2010
Expression
^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+(?:[a-zA-Z]{2}|aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel)$
Description
Matches email addresses. Based on expression at regular-expressions.info/email.html modified to include all top-level domains (TLD)listed on wikipedia as of June 2010. Needs to be updated as new TLDs are added. Known Issues: * IP Addresses will not validate * Double "at" symbols, e.g. email@[email protected] slip by this regex. Would welcome improvements by a regex ninja.
Matches
Non-Matches
Author Rating: The rating for this expression. Brent Thomas
Title Test Details International & Domestic Phone Numbers with Ext
Expression
^([\+][0-9]{1,3}([ \.\-])?)?([\(]{1}[0-9]{3}[\)])?([0-9A-Z \.\-]{1,32})((x|ext|extension)?[0-9]{1,4}?)$
Description
Somewhat conservative expression for evaluating phone numbers. Based off ideas found at http://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation this allows country codes, with or without the + symbol, area codes surrounded by parenthesis (or not) and numbers delimited by spaces, periods or dashes. You'll want to independently test for string length based on your needs.
Matches
(123)456-7890 | (123)456-7890 x123 | +1 (123)456-7890 | 12 3456 789 0 x1234 | (123)456-7890x123 |(123)456-7890ext123 | (123)456-7890 extension123 | 123.456.7890 | 1234567890 | 1234567 | 12 34 56 78 90 | 12 3 4567 890123 x4567 | +12 3456 7890 | +12 34 56 7890 | +12 3456 7890 | +12 34567890
Non-Matches
(123)456-7890 x 123 | 123.45.6.78+90
Author Rating: Not yet rated. Brent Thomas
   Displaying page 1 of 1 pages; Items 1 to 2

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