Page 1 of 1
Why do you think this wont work
Posted: Wed Feb 09, 2005 10:59 am
by azz0r_
nm
Posted: Wed Feb 09, 2005 11:16 am
by JayBird
The reason it isn't working is becuase your preg_replace is only replacing the first [img]and%20last[/img] tag
Posted: Wed Feb 09, 2005 11:17 am
by azz0r_
Strange, how can I get it to replace the right ones?
Posted: Wed Feb 09, 2005 11:26 am
by feyd
it's not strange.. you use the ungreedy modifier, but use the negation in your third grouping.
Posted: Wed Feb 09, 2005 11:27 am
by azz0r_
nm fixed.
Posted: Wed Feb 09, 2005 11:36 am
by JayBird
basically, remove the + in here (.+?)
Your code still doesn't work, cos the image height and width dont work.
Dunno if you are still working on that bit tho
Posted: Wed Feb 09, 2005 11:39 am
by d3ad1ysp0rk
uhh.. Please don't remove your original posts or answers to that, it kinda defeats the purpose of being able to search for answers.