Phone Number Regex Example
Match normalized phone numbers with optional plus prefix and 7 to 15 digits.
This phone regex example is designed for normalized phone strings where formatting characters have already been removed. It accepts an optional leading plus sign and then requires 7 to 15 digits, which covers many international phone length ranges. This approach is useful when your UI strips spaces, parentheses, and dashes before validation, or when an API expects E.164-like numeric input. It is intentionally simple so you can use it consistently across frontend forms, import pipelines, and API sanity checks. If your product needs locale-specific formatting rules, extension support, or strict country validation, pair this regex with specialized phone parsing logic. Use the Regex Tester to check both accepted and rejected samples, and add additional constraints once you know your exact input normalization flow.
Pattern
/^\+?[0-9]{7,15}$/Matches
+14155552671
447700900123
0987654321
Rejects
+1 (415) 555-2671
12-34
abc1234567
FAQ
Does this regex support spaces or dashes?
No. It targets normalized numeric strings without separators.
Can I enforce a fixed country code?
Yes. Replace the optional prefix with a strict country-code pattern for your region.
Is this enough for telecom-grade validation?
No. Use dedicated phone libraries for full numbering-plan validation and formatting.
Related: Regex Tester & Generator, Text Diff Checker, JSON vs YAML guide.
Browse all patterns in the regex examples hub.
More regex examples
Email Regex Example - Validate common email-like strings with a practical pattern suitable for frontend form checks.
Password Regex Example - Require uppercase, lowercase, number, symbol, and a minimum length for strong-password policies.
URL Regex Example - Validate common HTTP/HTTPS URLs including optional ports, paths, and query fragments.
IPv4 Regex Example - Match IPv4 addresses with strict 0-255 octet validation for each of four segments.