Using grep

The following tips should save you from having to do unecessary manual work. The first two greps are basic examples of what you can accomplish with grep. The Apple Scripts are essentially just a collection of many greps put together to perform a meaningful task. All these can be easily used on BBEdit, versions 6 - 8, on Mac OS X. These should work in other programs too, however, so long as your program supports grep while doing a find/replace, though the Apple Scripts will only work on a Mac without modifications.


Add paragraphs to blank document:

Find: \r\r
Replace: \r</p>\r<p>\r

Footnotes:

Find: \[(\d+)\]
Replace: <span class="ednote"><a href="#foot-\1" name="body-\1">[\1]</a></span>
Note: The above is for footnotes in the text. Simply reverse the href and name attributes for the actual footnotes.

Apple Scripts

Strip Omnipage Pro Netscape v4 output
Create Tables from tabbed text (replace selection only)