Re: [PHP] preg_replace works on normal string but not with a string build from a file

2002-12-03 Thread Jeroen Olthof
Thx, I had created a workarround, withs was looping through every line of the file and doing a rtrim. But your hint pointed me to the better solution The modifier m alone didn't do the job, because I uses a dot to match any character. But without the s modifier it will not match a new line. So b

RE: [PHP] preg_replace works on normal string but not with a string build from a file

2002-12-03 Thread John W. Holmes
> take a look at the following code > basic problem is, it works with the custom build string in the script but > not if get the code from a file. > I allways used ereg_replace but after installing a newer version of php > (4.2.2) it became very slow, so now I'm trying preg_replace > > please help

[PHP] preg_replace works on normal string but not with a string build from a file

2002-12-03 Thread Jeroen Olthof
hi, take a look at the following code basic problem is, it works with the custom build string in the script but not if get the code from a file. I allways used ereg_replace but after installing a newer version of php (4.2.2) it became very slow, so now I'm trying preg_replace please help !!! kind