Re: Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???}
| From: | Curt Zirzow | Date: | Thu, 15 Apr 2004 03:46:18 +0000 |
| Subject: | Re: Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???} | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-183408@lists.php.net to get a copy of this message | ||
* Thus wrote Tom Rogers (trogers@kwikin.com):
> Hi,
>
> Thursday, April 15, 2004, 8:56:05 AM, you wrote:
> RB> At 15:02 14-04-2004, Tom Rogers wrote:
>>...
>>
> RB> preg_replace() and ereg_replace(), so it's a bit hard to get a quick
> RB> glimpse of how big the difference really is ... (or for the _match() ones
> RB> for that matter)...
>
> RB> But thx ... looks useful :)
>
>
> Yes it is based on perl regular expressions which are pretty close to
> posix, close enough for simple stuff anyway.
> preg_replace is quite a bit faster than ereg_replace, I know preg_*
> functions keep a cache of expressions which can speed up repetitive
> uses. Not sure about ereg functions though.
From all benchmarks I've seen pcre beats posix hands down, not to
mention that pcre is much more powerful.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."