March 12th, 2013, 08:23 AM
A Regex quesiton. Validating only allowing numbers and 1 white space
I need a simple regex to validate for phone numbers with only numberds and 1 white space. For example:
Valid: 0405 333 535
Invalid:0405 333 535 (Devshed removes 2 white spaces!). It is supposed to be 0405 333 535
Last edited by zxcvbnm; March 12th, 2013 at 08:30 AM.
March 12th, 2013, 08:36 AM
the exact format of course depends on your location, but in general, the regex for multiple sequences of at least one digit separated by single spaces is simply
There's a regex forum, by the way.