D.8. Additional Regular-Expression Features

Regular expressions can contain "extended" syntax (where whitespace is optional, so a regular expression can be split over multiple lines, and can contain regular Perl comments), and can have positive and negative "lookahead." The syntax is a bit ugly, so rather than scare you off here, go look in Programming Perl, or see the perlre (1) manpage. Friedl's book, Mastering Regular Expressions (published by O'Reilly & Associates) explains all of this and much more.

Get Learning Perl, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.