February 2006
Intermediate to advanced
304 pages
6h 16m
English
Regular expressions are among Perl's most powerful features. But they are also the most cryptic. After all, it's hard at first glance to tell what /\s*(\S+)(\d+)/ really means. But it turns out that the regular expression matcher is a simple state machine whose input and processing can easily be represented graphically, as shown.
From this you can see that the regular expression consists of three major parts (excluding the start and end nodes) and that it stores results into $1 and $2. We'll go into what all those lines and symbols mean later, but this example shows how something complex and cryptic can ...
Read now
Unlock full access