regex pattern · ready to copy
Regex for matching phone numbers (international)
Permissive matcher for international formats — E.164 + common dashes/spaces/parens.
intermediate
javascript / pcre / python4 use cases
The pattern
\+?\d{1,3}[\s.-]?\(?\d{1,4}\)?[\s.-]?\d{1,4}[\s.-]?\d{1,9}
Test cases
| Input | Result |
|---|---|
| +1 (415) 555-2671 | ✓matches |
| +44 20 7946 0958 | ✓matches |
| 415.555.2671 | ✓matches |
| +972-50-1234567 | ✓matches |
| 123 | ✗rejects |
| abc-def-ghij | ✗rejects |
| phone:+notanumber | ✗rejects |
Edge cases & caveats
Will match number-like sequences in addresses or ZIP codes. Always pair with context check (preceding word "phone", "tel", "call"). For strict E.164 only, use `\+\d{1,3}\d{4,14}`.
Common use cases
- lead-form validation
- extract phones from CRM notes
- spam SMS filtering
- directory parsing
Try variations against your data
regexlab is a free in-browser tester with side-by-side match highlighting, group inspector, and named-capture export to JS/Python/PCRE.
Open regexlab
Related
ipv4 address · username · bitcoin address · hashtag · ↗ generate non-routable test phones