RE: [PHP] Phone Number #s Only?

From: Date: Fri, 03 Aug 2001 00:43:02 +0000
Subject: RE: [PHP] Phone Number #s Only?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61025@lists.php.net to get a copy of this message
No, the ^ inside the [] means the negation of whatever's inside...so, it'll strip out anything except 0-9. jack -----Original Message----- From: Martin Cameron [mailto:cameron@cameron.co.nz] Sent: Thursday, August 02, 2001 8:40 PM To: mike cullerton Cc: php-general@lists.php.net Subject: Re: [PHP] Phone Number #s Only? Just as the solution to spray paint the m/b green made me smile, this did too. This will strip out all characters except numerals at the beginning, right! martin Cameron On Fri, 03 Aug 2001 11:52, you wrote: > on 8/2/01 5:32 PM, Jeff Oien at jeff@webdesigns1.com wrote: > > Is there a routine out there to strip all characters from a phone > > number except the numbers? I was going to write my own but > > figured there must already be one out there I can use. Thanks. > > Jeff Oien > > ereg_replace ("[^0-9]","",$string); > > -- mike cullerton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#61025) next »