Textwrangler: remove blank lines

To remove blank lines from a text file in Textwrangler, you have to run search and replace, tick the ‘use Grep’ option and then search on the pattern ^\r. Replace with nowt and the effect is magic. A boon to the ‘everything in one big text file’ advocates.

The pattern < /?[^>]> can be used to remove all the HTML tags from a file (see below). I’d advise replacing the tags with a single space. The pattern should not have a space after the first angle bracket – WordPress and Textile are just playing up with the formatting.

Comments are closed.