Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(ID)?(\s?)([0-9]\d{3,7}\s?(\(?)[m|M|g|G|a|A|l|L|I|\|])(\s?)
/
g

Description

Extract an ID card from a body of text

Submitted by anonymous - 8 years ago