Re: phone number regular expression problem



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



.



Relevant Pages