Re: Re: [PHP] Regular Expression - it works but uses way too much memory ?

2004-06-19 Thread Ulrik S. Kofod
Robin Vickery sagde: The S modifier that you're using means that it's storing the studied expression. If the regexp changes each time around the loop then over 3 iterations, that'll add up. See if removing that modifier helps at all. The S modifier wasn't needed, I added it because I

Re: [PHP] Regular Expression - it works but uses way too much memory ?

2004-06-18 Thread Ulrik S. Kofod
Sorry to post this again but it's a little urgent. The preg_replace in my script allocates a little memory every time it is called and doesn't free it again untill the script ends. I don't know if it is normal behaviour for preg_replace or if it is my reg. exp. that causes this. The problem is

Re: Re: [PHP] Regular Expression - it works but uses way too much memory ?

2004-06-18 Thread Robin Vickery
On Fri, 18 Jun 2004 08:57:19 +0200 (CEST), Ulrik S. Kofod [EMAIL PROTECTED] wrote: Sorry to post this again but it's a little urgent. The preg_replace in my script allocates a little memory every time it is called and doesn't free it again untill the script ends. I don't know if it is

[PHP] Regular Expression - it works but uses way too much memory ?

2004-06-14 Thread Ulrik S. Kofod
$replace = /^(([a-z]+?[^a-z]+?){.($count).})(.$typedmask.)(.*)/iS; $with = $1error-start sourcetext=.$corr['sourcetext']. id=.$corr['id']. group=\.$corr['grupper'].\ class=\.$corr['ordklasse'].\ corrected-from=\.$corr['typed'].\ corrected-to=\.$corr['corrected'].\$3error-end