Regular Expressions 101

Community Patterns

1...34567...884

Post-1987 Irish Vehicle Registration Plates

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?i)[0-9]{2}[1|2]?-?(?>c[enw]?|dl?|g|k[eky]|l[dhkms]?|m[hno]|oy|rn|so|t[ns]|w[dhx]?)-?[0-9]{1,6}$
/
gm

Description

Validates Irish Vehicle Registration Plates to S.I. No. 318/1992 - Vehicle Registration and Taxation Regulations, 1992 (as amended). Also validates modern 3 digit year identifier (introduced in 2013).

Submitted by James Pelow - 3 months ago