Topic: HTML stripping

Hi All,

I've had to write a bit of code to strip out html between a pre-defined set of html comments in my CMS. 

For instance ...

<html> hello <--!start_strip-->strip this<--!stop_strip--> world </html>

should only return <html> hello world </html>

My rather mundane existing code works but only for one occurrence of the tags and I'm in danger of releasing some very poor and inefficient code.

Does anyone have a better solution, could a regexp do it?



Re: HTML stripping

Sure a regexp can do it... Something like


(not tested)