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 Match US phone numbers any format
Expression
^1?[\s\-\.]?[\.\-\s\(]?(\d{3})[\.\-\s\)]?[\s]?(\d{3})[\.\s\-]?(\d{4})$
Description
Matches all valid US phone number formats with any separators, with or without a 1. US area codes may not begin in 0 or 1. Area code is required.
Matches
3456789000 | 345-678-9000 | 345.678.9000 | (345) 678-9000 | 345 678 9000 | 1 (345) 678-9000 | 1-345-678-9000 | 13456789000
Non-Matches
1 (100) 345-6789 | 023-456-7890 | 1234567 | 1(1)23-45.67
Author Rating: Not yet rated. Logan Bertram
Title Test Details Felxible US address match
Expression
^\d+?[A-Za-z]*\s\w*\s?\w+?\s\w{2}\w*\s*\w*$
Description
Flexible match for valid US street addresses requiring at least some street number with or without a unit letter followed by a space, then either a modifier like N, W, West, etc, or no modifier, then another space, followed by the street name, then a space folowed by the street type abreviated or spelled out (ave or avenue). Can accept Apt number at the end. Does not match addresses with no number, improperly formatted numbers, or no street type.
Matches
3 Olive Lane | 1234 SE Franklin St | 34 East Avenue Apt 54 | 23b Orange Lane Apt 12 | 55 Martingale St Apt A
Non-Matches
West Avenue | 22b2 East St | 22 Olive | Apt 5
Author Rating: Not yet rated. Logan Bertram
   Displaying page 1 of 1 pages; Items 1 to 2

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