Regular Expressions 101

Library entries

Simple Phone Number validation

Vote

1

Regular Expression
pcre2

/
^(?![ -])(?!.*[- ]$)(?!.*[- ]{2})[0-9- ]+$
/
gm

Description

Loading markdown...
Submitted by Sowed Castelli - 3 months ago