in reply to regexp: least inclusive match?
use strict; use warnings; my $blog; { local $/; $blog = <DATA>; } my $word = q{Tags}; my $rxStrip = qr {(?xs) \b$word\b (?!.*\b$word\b) .* }; $blog =~ s{$rxStrip}{}; print $blog; __END__ Tags are very useful to included in these posts. Interested in growi +ng a home based business go here. Tags: Vemma Builder · wallstrip · Vemma · Vegas // Mar 2nd 2007 at 3:30 am vemma killa Leave a Comment Name Mail Website
I hope this is of interest.
Cheers,
JohnGG
|
|---|