Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(?:\(?)([0-9]{2})(?:\)? ?)(9?[0-9]{4})(?:\-)?([0-9]{4})
/
g

Description

With optional 9 digit

Submitted by Matheus Gambati - 9 years ago