Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
\d{5}(?:[-\s]\d{4})?
/
gm

Description

ZIP Code validator

Submitted by Donald Moore - 2 years ago