Regular Expressions 101

Community Patterns

Find abbreviations not in parenthesis

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<!\()[A-Z]{2,}(?!\))
/
gm

Description

Matches a sequence of 2 or more uppercase letters not surrounded by parenthesis.

Submitted by Devlin - a year ago