Hi,
I am trying to write a reg exp to verify that the phone number is entered correctly. I want the phone number to be entered like 99-9999 9999 and the reg exp I have is [0-9]{4}-[0-9]{4}(\s)[0-9]{4}. The problem is that it allows me to enter more than 4 numbers in the last block of numbers like 99-9999 999999999. Another question I have is how do you write an or statement with reg exp?? For example the number combination could be either 99-9999 9999 or 9999-999 999.
Thanks
Jonas
I am trying to write a reg exp to verify that the phone number is entered correctly. I want the phone number to be entered like 99-9999 9999 and the reg exp I have is [0-9]{4}-[0-9]{4}(\s)[0-9]{4}. The problem is that it allows me to enter more than 4 numbers in the last block of numbers like 99-9999 999999999. Another question I have is how do you write an or statement with reg exp?? For example the number combination could be either 99-9999 9999 or 9999-999 999.
Thanks
Jonas