Regular Expressions 101

Community Patterns

Community Library Entry

4

Regular Expression
PCRE (PHP <7.3)

/
(?i)(?P<provincia>[a-hj-np-z])(?P<numero>[\d]{1,4})(?P<calle>[a-z]{3})
/
g

Description

Validates CPA (Código Postal Argentino, spanish for Argentinian Postal Code).

Submitted by Agustín Bouillet - 9 years ago