Regular Expression Help

From: Date: Tue, 22 May 2001 17:44:42 +0000
Subject: Regular Expression Help
Groups: php.general 
Request: Send a blank email to php-general+get-53888@lists.php.net to get a copy of this message
I'm trying to figure out how to "say" with a Regular Expression how to check for the following characters in a phone number: ( ) - with a length between 1 and 20 -- I've tried the following and it doesn't seem to work. eregi("^([0-9]|\\(|\\)|\\-){1,20}$") I'm not interested in checking for a completely valid phone number... but instead checking to see if the phone number is numbers with or without the ( ) - characters. Plus, I think creating a Regex expr that can check for US and International formats would be too complex. Thanks. Jason

« previous php.general (#53888) next »