I'm usually ok on these, but am drawing a total blank today...
Here's what I want...
So my incorrect regex is basically
This can't be that hard, but I'm just not getting it today... any help?
Here's what I want...
Code:
$string = " end end test sometext end end end ";
$outstr = " end end test othertext end end end ";
So my incorrect regex is basically
Code:
/test(.*)end/
But that obviouslly matches the last end resulting in
$outstr = " end end test othertext end"; (after I do the magic replacing stuff.
FIrst thing that pops to mind is
/test([^end])/
but that matches e|n|d, not the word end...