Re: Optimal Regex?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux