Re: phone number regular expression problem
- From: axel@xxxxxxxxxxxxxxxxxxxxxx
- Date: Wed, 31 May 2006 14:11:25 GMT
venu <svenugopaal@xxxxxxxxx> wrote:
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
To check the constraints:
/^[0-9+-]*$/ && tr/+// < 2
I'm sure someone else can suggest a Perl module suitable for dialing
up the number in question to 'validate' it.
Axel
.
- References:
- phone number regular expression problem
- From: venu
- phone number regular expression problem
- Prev by Date: Database SQL problem....
- Next by Date: Re: phone number regular expression problem
- Previous by thread: Re: phone number regular expression problem
- Next by thread: Re: phone number regular expression problem
- Index(es):
Relevant Pages
|
|