Validationflags: g
US Phone Number
Match US phone numbers in common formats: (555) 867-5309, 555-867-5309, 5558675309.
Try it in RegexProPattern
regexJavaScript
/\(?\d{3}\)?[\s.\-]?\d{3}[\s.\-]?\d{4}/gRaw source: \(?\d{3}\)?[\s.\-]?\d{3}[\s.\-]?\d{4}
How it works
The optional \(? and \)? allow parentheses around the area code. The [\s.\-]? between groups allows spaces, dots, or hyphens as optional separators.
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