Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE2 (PHP >=7.3)

/
(?:\d[ -]*?){9}
/
gm

Description

Finds a number that is 9 digits long. Can have spaces or hyphens in between the numbers and will still be found

Submitted by anonymous - 2 years ago