Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<![A-Z]{1}[a-z]{1})(?=[A-Z](?![a-z]{1}))([a-zA-Z]{2,4})(?![a-z]{1})(?![A-Z]+[_])
/
g

Description

Matches any abbreviations of a length between 2 and 4.

Submitted by anonymous - 8 years ago