Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2021-02-03 07:58
Flavor·PCRE (Legacy)

/
^([A-ZäÄÖÜ]{1,3})\-[ ]{0,1}([A-Z]{0,2})[ ]{0,1}([0-9]{1,4}[HE]{0,1})[ ]{0,1}([0-9]{0,2})[ ]{0,1}([0-9]{0,2})$
/
gm
Open regex in editor

Description

  • This regex validates German vehicle registration numbers. It includes 'H' for Oldtimers (Historic) and 'E' for electric. Futhermore it validates optional seasonal plates. For example for motorcycles or recreational vehicles.
Submitted by awwillia