-
How would I write a validation expression for a Phone number
I'm trying to figure out how to write a validation expression that would allow these formats : (xxx)xxx-xxxx , 123456789
anyone know of any validation expressions that is somewhat like that or exactly like that or better ?
-
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
phone number expression
well, for your first example (xxx) xxx-xxxx , the expression would be
^\([2-9]\d{2}\) \d{3}[- .]?\d{4}\D*(\d*)$
and for your second example, xxxxxxxxxx , the expression would be short and simple....
^\d{10}$
good luck!
Similar Threads
-
Replies: 3
Last Post: 06-19-2003, 03:40 PM
-
Replies: 1
Last Post: 10-05-2001, 02:11 AM
-
Replies: 2
Last Post: 08-30-2001, 11:32 AM
-
Replies: 1
Last Post: 01-04-2001, 06:32 AM
-
Replies: 1
Last Post: 07-12-2000, 01:23 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|