Skip to main content
Regexflux

US Phone Number

beginner

Matches US phone numbers in various common formats.

phonevalidationustelephone

Pattern

/(?:\+?1[-\s.]?)?\(?\d{3}\)?[-\s.]?\d{3}[-\s.]?\d{4}/g

Try It

0 of 7 strings matched

Explanation

Matches US phone numbers with optional country code (+1), area code with optional parentheses, and groups separated by hyphens, spaces, or dots.

Test Strings

Matching

  • (555) 123-4567
  • +1-555-123-4567
  • 555.123.4567
  • 5551234567

Non-matching

  • 123-456
  • 555-1234-567
  • abc-def-ghij

Language Compatibility

LanguageSupport
JSFull support
PYTHONFull support
JAVAFull support
PHPFull support
GOFull support

Code Snippets

const regex = /(?:\+?1[-\s.]?)?\(?\d{3}\)?[-\s.]?\d{3}[-\s.]?\d{4}/g;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);

Common Variations

Strict format

\(\d{3}\) \d{3}-\d{4}

Only matches (555) 123-4567 format

Related Patterns