Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

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

Description

Hides credit card numbers from 13-16 digits

Submitted by anonymous - 6 months ago