PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
azz0r_
Forum Commoner
Posts: 27 Joined: Mon Jan 24, 2005 4:15 pm
Post
by azz0r_ » Wed Feb 09, 2005 10:59 am
nm
Last edited by
azz0r_ on Wed Feb 09, 2005 11:26 am, edited 1 time in total.
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Wed Feb 09, 2005 11:16 am
The reason it isn't working is becuase your preg_replace is only replacing the first [img]and%20last[/img] tag
azz0r_
Forum Commoner
Posts: 27 Joined: Mon Jan 24, 2005 4:15 pm
Post
by azz0r_ » Wed Feb 09, 2005 11:17 am
Strange, how can I get it to replace the right ones?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Feb 09, 2005 11:26 am
it's not strange.. you use the ungreedy modifier, but use the negation in your third grouping.
azz0r_
Forum Commoner
Posts: 27 Joined: Mon Jan 24, 2005 4:15 pm
Post
by azz0r_ » Wed Feb 09, 2005 11:27 am
nm fixed.
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Wed Feb 09, 2005 11:36 am
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
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Wed Feb 09, 2005 11:39 am
uhh.. Please don't remove your original posts or answers to that, it kinda defeats the purpose of being able to search for answers.