Search code examples
regexphone-number

Regular expression for Dutch phone number


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})$

Solution

  • I have seen this before at http://regexlib.com/Search.aspx?k=phone%20number Check this website out, hope it helps.

    (^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)
    

    Regular expression to evaluate dutch-style phone numbers. Possible example prefixes: +31, +31(0), (+31)(0), 0, 0031 followed by 9 numbers (which can contain a space or -).