Regular Expressions 101

Community Patterns

1...56789...901

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(1\s?)?(\d{3}|\(\d{3}\))[\-\s]?\d{3}[\-\s]?\d{4}$
/
gm

Description

I write this to complete the Freecodecamp asssignment. This page very helpful Thanks aksonai for bringing me here

Submitted by anonymous - 3 years ago