Regular Expressions 101

Community Patterns

Flexible phone validation

1

Regular Expression
Python

r"
^(\+[0-9]{1,2})?(\.|\ |\-)?([0-9]{1,3}(\.|\ |\-)?){5,6}$
"
mg

Description

International / national format allowing space or dots as separator.

Submitted by anonymous - 4 years ago