|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
phone number regular expression problemHi,
I have a different requirement and it is : I need to validate a phone number field. It may or may not be a US phone number. The constraints are : *********************** # It should accept any number of numbers # any number of - hyphens # and one + symbol # no other characters and alphabets are allowed Thanks in advance Venugopal.S ^((\+){0,1}91(\s){0,1}(\-){0,1}(\s){0,1}){0,1}98(\s){0,1}(\-){0,1}(\s){0,1}[1-9]{1}[0-9]{7}$
Hi,
You should be able to get started with this, at least... ^[\d-]*\+?[\d-]*$ Hope that helps. Dave venu wrote: Show quoteHide quote > Hi, > I have a different requirement and it is : > > I need to validate a phone number field. > It may or may not be a US phone number. > > The constraints are : > *********************** > > # It should accept any number of numbers > # any number of - hyphens > # and one + symbol > # no other characters and alphabets are allowed > > Thanks in advance > > Venugopal.S
Opinion: VPN or Web Service?
Seeking report component.... AxWebBrowser problems in VS2005 Saving changes to a database Setting the correct tabindex C# to VB Conversion - 800 lines got - 2 lines beyond me Show dynamically selected row in datagridview How to test internet connection in VB.NET? Assembly - Where did I come from? Determine caller class name |
|||||||||||||||||||||||