I am struggling with getting the right regex for a phone number validation in my application. I have got a regex that will accept only numbers and some special symbols like ()- etc, however, the problem is that it accepts only symbols as well. So for example, it would accept something like ()()()(). I want to modify the regex or get a whole new regex that accepts these symbols but it should have at least one number before and after each symbol.
My requirements are:
- Only numbers
- Number with combination of special symbols
- Each symbol should be followed by a number (before and after) but white spaces are okay
- Max length should be 15
... x123)?1.)