I use always this one:
isMatch($PostcodeHoofdletters, '^[1-9][0-9]{3}\s?[a-zA-Z]{2}$')
Right values 1234AB | 1234 AB | 1001 AB
Wrong values 0123AB | 1234A B | 0123 AB
Regards,
Ronald
I've tested the following regular expression with https://regex101.com/ which matches capital and lower case combinations, with or without a space between the numbers and letters, while not allowing certain abbreviations related to the nazi regime ( sa|sd|ss).
^[1-9][0-9]{3}\s?(?!sa|sd|ss)[a-zA-Z]{2}$
'\s' can be omitted to not allow spaces
[a-zA-Z] can be changed to either [a-z] for only lower case matches or [A-Z] for only upper case matches