Title |
Test
Find
German License Plate
|
Expression |
^[A-ZÄÖÜ]{1,3}\-[ ]{0,1}[A-Z]{0,2}[0-9]{1,4}[H]{0,1} |
Description |
This one checks if the value is a possible german License Plate. The trailing H stands for Historical cars. |
Matches |
F-RM373, WÜ-Z1, K- 07333,HN-WK11H |
Non-Matches |
MOS-AS |
Author |
Rating:
Not yet rated.
Kemmeter
|
Source |
|
Your Rating |
|
Title: Example with 5 number not really matched
Name: J
Date: 1/5/2023 2:31:56 PM
Comment:
Your example "K- 07333" is a match with the regex, but only for the first 4 numbers, not the last '3'.
The regex should be fixed to [0-9]{1,5} (instead of [0-9]{1,4}), if german number plates indeed can have 5 digits.
The regex should also finish with '$' to ensure that it matches the entire string and not just the first characters.
Title: Example with 5 number not really matched
Name: J
Date: 1/5/2023 2:31:43 PM
Comment:
Your example "K- 07333" is a match with the regex, but only for the first 4 numbers, not the last '3'.
The regex should be fixed to [0-9]{1,5} (instead of [0-9]{1,4}), if german number plates indeed can have 5 digits.
The regex should also finish with '$' to ensure that it matches the entire string and not just the first characters.