I'm looking for a regular expression to match a Dutch phone number. These are the formatting requirements:
- Should start with 0
- Contains maximum of 1 (optional) dash "-" character, for now it does not matter where it is, as long as it's not the first character
- Total length 10 or 11 characters
This is what I've come up with so far:
^0+-{1}?([0-9]{10,11})$
-{1}?
? Just use-?
to make the dash optional – Norite{0,1}
if they're recreating the functionality of the?
. – Paternal{0,1}
instead of?
:) ps: I've heard some people like that syntax :o – Norite