On Mon, Jan 17, 2005 at 01:50:53PM -0600, Josh Trutwin wrote: > Sorry for the cross post - wasn't sure what the best list to ask this > was. > > I need a Perl RE to replace a specific HTML comment, something like: > > <!-- blahblahblah Josh blahblahblah --> > > I want to remove all comments with the word Josh in it. "Josh" could > be anywhere inside the comment tags. Handling HTML with regexen is wrong, but this might get you by: s/<!--.*?Josh.*?-->//sg; -- 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