Thoughtstream | Seminars

Taming Perl Regexes

Regexes are the weasels of the programming world: compact, immensely powerful, doggedly single-minded in their task, and with a nasty tendency to maul you, when and where you least expect it. And Perl regexes are the biggest, most powerful, and potentially meanest code weasels of all: wolverines in your source.

This talk demonstrates and explains a new Perl module (Regexp::Debugger) that helps tame unruly regexes by providing live interactive run-time visualizations of any regex in your code, as it matches. The debugger allows you to track capture variables, follow recursive subpattern matches, set break-points within a regex match, and even step backwards through the matching process to work out exactly where things started going so horribly wrong.