Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(\(?\d{2}\)?)\s?(\d{5})-(\d{4})
/
gi

Description

Recebe os formatos: 1: dd xxxxx-xxxx 2: (dd) xxxxx-xxxx 3: ddxxxxx-xxxx 4: (dd)xxxxx-xxxx

Submitted by Cleverson - 8 years ago