Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
\bi('|\b\s+a)m \b\d{1,2}(?:\.\d+)?\b(?!\s*%)
/
gm

Description

Match "I'm ##" or "I am ##"

Submitted by Matt - a year ago