Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
^[0-9]{2}[\s]?[0-9]{4}[-]?[0-9]{4}$
/

Description

A regex for brazilian telephones

Submitted by André Ramos (github.com/andrelramos) - 9 years ago