Regular Expressions 101

Community Patterns

id number

1

Regular Expression
PCRE (PHP <7.3)

/
^([c|e])([0-9]{6})$
/
gm

Description

find first letter that matches c or e then ensure remaining line is a digit

Submitted by anonymous - 8 years ago