There’s a tool called Visual-Regexp which allows you to play around with regular expressions and matching. I use it every now and then when I’m working on a tricky one, or when the regular expresssion I just created somehow fails to match anything.
See http://wiki.tcl.tk/7992 for details. The interface takes a little getting used to, but once you get the hang of it…
Don’t confuse with Regexplorer, which is a similar tool written in Perl.