Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(\n|\s)(?:(?:\+?(\d{1}|\d{2}|\d{3})\s*)\s*(?:\(\s*(\d{1}|\d{2}|\d{3})\s*\)|(\d{1,3}))\s*\-?(?:\(\s*(\d{1,3})\s*\)|(\d{3}))\s*\-?(?:\d{2}\s*\-?\d{2}))
/
gm

Description

My own regex for telephone number for my task

Submitted by anonymous - 6 years ago