Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?<City>.*)\s(?<State>[^\s\d]+)\s?(?<Zip>[0-9\-]{5,})?$
/
gm

Description

City State Zip

Submitted by anonymous - 3 years ago