Regular Expressions 101

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
\b(?<!\d.)(3[47]\d{2}([ -]?)(?!(\d)\3{5}|123456|234567|345678|424242|545454)\d{6}\2(?!(\d)\4{4})\d{5}|((4\d|5[1-5]|65)\d{2}|6011)([ -]?)(?!(\d)\8{3}|4242|5454|1234|3456|5678|2345|4567)\d{4}\7(?!(\d)\9{3})\d{4}\7\d{4})(\b|\s)(?!.\d\d)
/
g

Description

no description available

Submitted by anonymous - 9 years ago