Re: Optimal Regex?

From: Date: Tue, 27 Sep 2005 03:54:16 +0000
Subject: Re: Optimal Regex?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-223244@lists.php.net to get a copy of this message
David Pollack wrote:
Ok, so this is the actual code that I'm using. <? $string = "( 334, -53.44) ( 111 , 222 )"; $testStr = $string; // $string = str_replace(" ", "", $string); preg_match_all("-?([\d]+)?(\.[\d]+)?",$string, $matches);
preg_match_all("/-?([\d]+)?(\.[\d]+)?/", $string, $matches); -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/

« previous php.general (#223244) next »