Regular expression for validating international phone numbers
We did our best to test and modify if necessary pattern strings however as time goes by standards changes and some of them could became no longer valid. Australia has 4-digit numeric postal codes with the following state based specific ranges.
Therefore Regular Expression Validation Rules should be used with caution. Accepts all forms of Australian phone numbers in different formats (area code in brackets, no area code, spaces between 2-3 and 6-7th digits, 61 international dialling code).
A number of projects at Uber require collecting a user’s phone number.
To date, each project at Uber has had to implement their own unique solution for collecting this information.
The regular expression is quite simple, which makes the expression reasonably readable. What if the phone number contains a dash or parenthesis? What if we need to support the 6-digit phone numbers which are also used in Australia?For more information on regular expressions please visit: of regular expressions were taken from