I have created a reg Exp, which basically allows all formats I like it to allow. However, there still is a little problem with the ()…
^\(?(\+?\d+)?\)? ?\d*(-?\d{2,3} ?){0,4}$
This would be valid: (+356-123 456 78, however it shouldn’t…. same for +356)-123 456 78.
Anyone knows how to make sure the pattern contains both () or none?
Try this:
It allows the the area code to either have an area code with parenthesis or without.