Regular Expressions 101

Community Patterns

1...56789...901

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(([0\+]\d{2,3}-)?(0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$
/

Description

固定电话正则验证,不验证区号(区号不加区号都可以)

Submitted by rhy - 7 years ago