This module discussed the details about Perl's regular expressions and how to use them to make working with text more powerful.
Now you should be able to write more powerful programs to handle some of your text-processing tasks.
In the next module, you will learn about Perl's program-flow capabilities, including the use of loops, conditionals, and subroutines (functions).
Regular expressions are all about matching and finding patterns in text, from simple patterns to the very complex.
This module discussed some of the simpler ways to match patterns using:
String literals
Digits
Letters
Characters of any kind
Perl provides a rich set of regular-expression operators, constructs, and features, with more being added in each new
release. Perl uses a Traditional NFA match engine.
NFA engine
For an explanation of the rules behind an NFA engine, see âIntroduction
to Regexes and Pattern Matching.â This reference covers Perl version 5.8. A number of new features will be introduced in Perl 5.10; these are covered in
Table 8. Unicode features were introduced in 5.6, but did not stabilize until 5.8. Most other features work in versions 5.004 and later.
Supported Metacharacters
Perl supports the metacharacters and metasequences listed in Tables Table 4-12.1 through Table 4-12.3 .
To learn more about expanded definitions of each metacharacter, see "Regex Metacharacters, Modes, and Constructs.""
Regular Expression - Quiz
Before you move onto the next module, make sure to click the Quiz link below to take a multiple-choice quiz that has questions addressing all of the lessons we have worked through in this module.
Regular Expression - Quiz