Wednesday, January 11, 2012

Regex in TextPad

Just spent far too much time trying to figure out regular expressions in TextPad. Here's a good reference:

http://johnbokma.com/textpad/textpad-reference.pdf

The specific things that were holding me up:
  1. Go to Preferences->Editor and check "Use POSIX regular expression syntax" so you don't have to escape your parentheses etc.
  2. Enclose tagged expressions (the things that you'll refer to in your replace string with \1, \2, etc) in parentheses

No comments:

Post a Comment