Debugging Regular Expressions


This section has shown you how to use the regex debugging facilities built into Perl and the Perl debugger. You’ve learned how to view the usually voluminous output and how to interpret the data provided. There is a great deal of support here (usually overlooked by the average programmer) that we hope this chapter has clued you into.

For further ideas on debugging regexes in Perl check out the following perldoc references:
  • perldebguts: Explains how the debugger can help to dissect your regexes.

  • perlre: The re pragma (particularly use re ‘debug’), will also help in a number of cases and a study of the manpage will be time well spent in any case.

  • perlretut: The standard regex tutorial.

The next chapter offers an introduction to the customizing of the debugger, either by using the available commands and options, or by replacing the entire library itself.


Regular Expression Command Line Angle Bracket Compilation Part Alphanumeric Character 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Richard Foley with Andy Lester 2005

Personalised recommendations