Minimum length Regex -
i need help enforcing right australian phone number. have far. how can create require user start number either '02,04,03,07 or 08 , must 10 characters long?
^\({0,1}((0|\+61)(2|4|3|7|8)){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3}$
if want allows 10 characters remove unwanted (
, -
, +61
regex,
^((0)(2|4|3|7|8))[0-9]{2}[0-9]{2}[0-9]{1}[0-9]{3}$
demo
regex
No comments:
Post a Comment