Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^([+]{1}[1-9]{2,3}[ .-]?)?[0-9]{1,3}([ .-]?[0-9]{2,3}){3,6}$
/
mug

Description

Match :

  • '+' at start.
  • ' ' | '.' | '-' between number.
  • Between 7 and 24 numbers.

Work with HTML5 pattern.

Submitted by valent1618 - 2 years ago