Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?:\d[ -]*?){13,16}
/
gm

Description

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

Submitted by Spencer Curtis - 3 years ago (Last modified 3 years ago)