[PHP] function that extracts numbers from a string

2002-02-22 Thread DigitalKoala

Hi folks,

Is there a function that extracts numbers from a string?

I can do this with ereg but it's quite slow when you have a long list of
variables to get through...

thanks!

dk




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




Re: [PHP] function that extracts numbers from a string

2002-02-22 Thread Andrey Hristov

Try with preg_match_all()
PCRE functions are up to 25% faster than POSIX(ereg).

Best regards,
Andrey Hristov

- Original Message - 
From: DigitalKoala [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 1:44 PM
Subject: [PHP] function that extracts numbers from a string


 Hi folks,
 
 Is there a function that extracts numbers from a string?
 
 I can do this with ereg but it's quite slow when you have a long list of
 variables to get through...
 
 thanks!
 
 dk
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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