in reply to Call for code samples!

In my simple site search script I posted recently I have three regexes working on the same lvalue to cut off the top and tail from some html and remove all the tags:

$file =~ s/^.*$startstring/$startstring/s; $file =~ s/$endstring.*$//s; $file =~ s/<[^>]*>/ /g;
I felt at the time this was a bit ugly, and should certainly have been doable in one regex, but didn't work out how - that's something I'd like to be able to do with a regex, though I agree it's not all that sophisticated.



§ George Sherston