Regular Expressions 101

Community Patterns

North America - US - N11 Service Number - e.164 compliant/non-compliant

-1

Regular Expression
ECMAScript (JavaScript)

/
^\+?[1]?[2-9]{1}11$
/
gm

Description

This expression can be used for identifying if a string (such as a dialed number using a cloud based telephony service) matches one of the known North American US N11 Service Numbers. It will match if the number is in e.164 format or not, and only matches when the string begins and ends with the desired values.

Submitted by Benjamin Dean - 7 years ago