| Title |
Test
Find
Pattern Title
|
| Expression |
^[0-9]{2,3}-? ?[0-9]{6,7}$ |
| Description |
Validates Spain Phones |
| Matches |
972367087 | 97-3770866 | 972-377086 |
| Non-Matches |
9988-989898 | 989898988989 | 9 9898989898 |
| Author |
Rating:
Not yet rated.
Francesc Vila
|
| Source |
|
| Your Rating |
|
Title: Issue found
Name: RG
Date: 8/31/2010 11:22:38 PM
Comment:
As standard phone numbers in Spain are of length '9' but this expression will also validate number of length '10' (Telephone number is entered without '-' or space). How to prevent this in regular expression only?