Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
([a-z]*_)([A-Z]{2})*
/
u

Description

find country code in locale code for example en_US -> US en_GB -> GB

Submitted by anonymous - 4 years ago