Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(([\+]?[ 0-9]{1,6}([ \.\-])?)?([\(]{1}[ +0-9]{2,6}[\)])?([ 0-9A-Z\.\-]{1,32})([0-9]+))|((e|x|ex|ext|extension)(\.|\:)?([ ]{1})?[0-9]+)
/
gm

Description

Useful for phone number extraction

Submitted by hslayer - 7 years ago