Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^\((.*,\s*\d+(?!,\s*'\d{1,2}-\d{1,2}-\d{1,4}'))\);$
/
gm

Description

Regex for detecting lines that don't have a date before closing parentheses. It uses a negative lookahead.

Submitted by anonymous - 5 years ago