On Tue, Jan 18, 2005 at 09:45:31AM -0600, Josh Trutwin wrote:
[snip]
> Regardless, the above regex is a little too greedy, despite the .*? -
> for example it matches the entire string:
> 
> <!-- Comment 1 -->Content<!-- Comment which includes Josh -->

Right, thanks for the clarification.  How about this:

  s/(<!--(.*?)-->)/ index($2,'Josh') > -1 ? '' : $1 /esg;

Which should select or reject individual comments based on their
contents.

-- 
trammell at el-swifto.com  9EC7 BC6D E688 A184 9F58  FD4C 2C12 CC14 8ABA 36F5
Twin Cities Linux Users Group (TCLUG)      Minneapolis/St. Paul, Minnesota