Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^((\+7|7|8)((\-\([0-9]{3}\)\-)|(\([0-9]{3}\))|(\s[0-9]{3}\s)|(\-[0-9]{3}\-)|[0-9]{3})[0-9]{3}((\s|\-)?)[0-9]{2}((\s|\-)?)([0-9]{2}))$
/

Description

Работает с форматами +7, 7, 8 Варианты валидации любые.

Submitted by anonymous - a year ago