I'm using this regular expression to replace lines that contain -foo
:
^.*?(-foo\b).*$
After the replacement, there's a bunch of blank lines left where the lines originally existed. How can I change this to remove the line itself instead of leaving a blank line?
The context that I'm doing this in is an Ant script and here's the full line if it helps:
<replaceregexp file=" ... " match="^.*?(-foo\b).*$" replace="" byline="true" />