BytePane

Phone Number (International) Regex Pattern

Validates international phone numbers following the E.164 standard. Supports 1-15 digits with optional plus prefix.

Validation
Intermediate
Difficulty
Universal
Language
none
Flags
// Regular Expression
/^\+?[1-9]\d{1,14}$/

Live Regex Tester

Pattern Breakdown

^\+?[1-9]\d{1,14}$
Character class [ ]
Group ( )
Quantifier { }
Anchor ^ $
Repetition * + ?
Escape \
Alternation |
Any char .

Code Examples

JavaScript

const regex = /^\+?[1-9]\d{1,14}$/;
const test = "+442071234567";
console.log(regex.test(test)); // true

// Extract matches
const matches = test.match(regex);
console.log(matches);

Python

import re

pattern = r'^\+?[1-9]\d{1,14}$'
test = "+442071234567"
match = re.search(pattern, test)
print(match)  # Found!

Go

package main

import (
    "fmt"
    "regexp"
)

func main() {
    re := regexp.MustCompile(`^\+?[1-9]\d{1,14}$`)
    fmt.Println(re.MatchString("+442071234567")) // true
}

Common Use Cases

International phone validationE.164 format compliance

Match Examples

InputResult
+442071234567Match
+0123No Match

About the Phone Number (International) Regex

Validates international phone numbers following the E.164 standard. Supports 1-15 digits with optional plus prefix.

Regular expressions (regex) are powerful pattern matching tools used across virtually all programming languages. The phone number (international) pattern is classified as intermediate difficulty in the validation category. It works in all major programming languages.

When using this regex, always consider edge cases and test thoroughly with real-world data. Use the interactive tester above to validate the pattern against your specific inputs before deploying to production.

Need More Regex Patterns?

Browse our complete library of 100+ regex patterns with interactive testers.

Frequently Asked Questions

What is the Phone Number (International) regex pattern?

Validates international phone numbers following the E.164 standard. Supports 1-15 digits with optional plus prefix.

How do I use the Phone Number (International) regex?

Use the pattern /^\+?[1-9]\d{1,14}$/ in your code. In JavaScript: new RegExp('^\+?[1-9]\d{1,14}$', ''). Test it above with your own input.

What does this Phone Number (International) regex match?

This pattern matches: "+442071234567". It does NOT match: "+0123". International phone validation, E.164 format compliance.

Is the Phone Number (International) regex beginner-friendly?

This pattern is rated Intermediate. It uses some advanced features like character classes and quantifiers.

What languages support the Phone Number (International) regex?

This pattern works in all major programming languages including JavaScript, Python, Java, C#, Go, Ruby, PHP, and more. Syntax may vary slightly between regex engines.

Can I modify the Phone Number (International) regex for my use case?

Yes! Use the interactive tester above to modify the pattern and test with your own data. Common modifications include making it case-insensitive (add 'i' flag), matching globally (add 'g' flag), or adjusting character classes.

Related Tools