How to validate the below Housenumber using jquery Form validation?
1
1b
12
12b
123
123b
1234
1234b
the letter should be always last position , but not required. Please help me to create regular expression.
The following RegExp will do:
/^\d+[a-zA-Z]*$/
^ Must start with
\d+ Any number (\d), at least once (+)[a-zA-Z]* Some letters [a-zA-Z] (optional: *)$ Must end here
regex "^\\d+/?\\d*[a-zA-Z]?(?<!/)$" will match numbers like:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With