Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
\b(5[1-5][0-9]{2}[ -])([0-9]{4}[ -]){2}[0-9]{4}\b|\b(5[1-5][0-9]{2})([0-9]{4}){3}\b|\b222[1-9][ -]([0-9]{4}[ -]){2}[0-9]{4}\b|\b222[1-9]([0-9]{4}){3}\b|\b22[3-9][0-9][ -]([0-9]{4}[ -]){2}[0-9]{4}\b|\b22[3-9][0-9]([0-9]{4}){3}\b|\b2[3-6][0-9]{2}[ -]([0-9]{4}[ -]){2}[0-9]{4}\b|\b2[3-6][0-9]{2}([0-9]{4}){3}\b|\b27[01][0-9][ -]([0-9]{4}[ -]){2}[0-9]{4}\b|\b27[01][0-9]([0-9]{4}){3}\b|\b2720[ -]([0-9]{4}[ -]){2}[0-9]{4}\b|\b2720([0-9]{4}){3}\b
/
gm

Description

no description available

Submitted by anonymous - 6 years ago