Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- preg_match_all has some limits?
- Mauro D.
November 4, 2005, 9:23 am
rate this thread
i'm trying to replace a picture inside an RTF file.
I have found that this is the format the picture is described inside RTF:
...some binary data...}}
RTF file is about 3,9MB and this expression "\}/"
doesn't return anything that i can change.
My wish is to change attribute of the string that I have paste on the
top and obviously change binary data!
Re: preg_match_all has some limits?
I'd switch to single quotes around the PHP string to avoid added confusion
with slashes - it's tricky enough already.
Consider for example (which appears in your expression):
The actual value of that string is:
Because the first slash escapes the second in PHP, and the s is a literal
So \s reaches the PCRE engine, which interprets this as "whitespace
Do you want something more like (and I've not quite convinced this is right
Andy Hassall :: firstname.lastname@example.org :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool