I stumbled upon the Emacs command M-x re-builder. It allows you to interactively write a regexp and see it matched in the normal buffer.
It seems utterly useful, except for the tiny problem that it doesn't seem to support Perl compatible regexps. Please prove me wrong, I haven't been able to find any docs for it.
Bonus URL: The Regex Coach