Have you ever wanted to test out regular expressions in emacs? Until I found out about
re-builder I used to run
M-x isearch-forward-regexp (also bound to
C-M-s) in a buffer until I figured out the expression I needed. This works but just having
M-x re-builder in your bag of tricks helps. In the words of the author, Detlev Zundel
When I have to come up with regular expressions that are more complex than simple string matchers, especially if they contain sub expressions, I find myself spending quite some time in the `development cycle’. `re-builder’ aims to shorten this time span so I can get on with the more interesting bits. With it you can have immediate visual feedback about how well the regexp behaves to your expectations on the intended data.
re-builder supports a number of different input forms for the regular expression. The input type can be changed by
C-c TAB when you are in this mode.
Read Regexp Syntax in re-builder
Another nice feature is the highlighting of the different subexpression matches. Xemacs has added perl regular expression support to
re-builder as noted on the emacs wiki. I hope this gets added back into GNU emacs.