US Phone Number
Match US phone numbers in common formats: (555) 867-5309, 555-867-5309, 5558675309.
Try it in RegexPro →Available in
Pattern
\(?\d{3}\)?[\s.\-]?\d{3}[\s.\-]?\d{4} (flags: g)Raw source: \(?\d{3}\)?[\s.\-]?\d{3}[\s.\-]?\d{4}
How it works
Examples
Input
(555) 867-5309Matches
(555) 867-5309
Input
555.867.5309Matches
555.867.5309
Input
5558675309Matches
5558675309
Common use cases
- •Contact form validation
- •Extracting phone numbers from documents
- •CRM data normalisation
- •Marketing list cleaning
Related patterns
International Phone Number (Loose)
ValidationMatch international phone numbers in a variety of loose formats including country codes, area codes, and separators.
International Phone (E.164)
ValidationValidate phone numbers in ITU-T E.164 international format: a + sign followed by 2–15 digits, first digit non-zero.
Credit Card Number
ValidationMatch 16-digit credit card numbers with optional spaces or hyphens between groups of 4.
US Social Security Number
ValidationMatch US Social Security Numbers in the canonical XXX-XX-XXXX format.
Related concepts
Character Classes: \d, \w, \s and Their Negations
ConceptShorthand character classes match broad categories of characters. \d is a digit, \w is a word character, \s is whitespace. Uppercase negates.
Quantifiers: *, +, ?, and {n,m}
ConceptQuantifiers repeat the preceding element. * is 0 or more, + is 1 or more, ? is 0 or 1. {n}, {n,}, and {n,m} give exact counts and ranges.
How to Match Digits in Regex
How-toUse \d for any digit, [0-9] for ASCII digits only, or {n} to match a specific count of digits. Combine with anchors for whole-string validation.
How to Match an Optional Group
How-toPut a ? after a character, group, or character class to make it optional. Groups with ? match zero or one occurrence of the whole group.