How do I remove content between X and Y using preg_replace?

You should escape the "/" in "uploads/" and g isn't a valid modifier, plus ^ is invalid, I guess you wanted . Instead. Here is your regex : /(?+?(?=uploads\/)/ The test on ideone.

Thanks Colin, this was working until I noticed one thing I've been trying to figure out. If there are multiple images/links I need to do this to on the same line, it looks like it grabs everything from the very first quote, to the very last uploads/ pathname. Ie: – kilrizzy Nov 16 '10 at 16:12 ideone.Com/Cd5oa – kilrizzy Nov 16 '10 at 16:18.

By simplifying you remove the "=" part in the look-behind (which could be important) and you removed the laziness (which could be dangerous) and replaced it by an optional . (which is wrong given the initial regex). – Colin Hebert Oct 19 '10 at 17:29 @Colin the spec is "after a quote" (hence the lookbehind change) and "any content" (hence the change to .

*). I had already changed the greedy *. – lonesomeday Oct 19 '10 at 17:33.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions