Book Reviews

The following book reviews are the copyright of their respective authors and no part should be reproduced without the express permission of the author. Publishers and Authors of the books reviewed may reproduce the whole or extracts of a review for their book. To request copyright permission please email

All the reviews herein are the opinions of the reviewer and are not necessarily the views of Birmingham Perl Mongers and its members. If you feel a review or comment has been made in error, please contact to rectify the situation.

Perl Books

Static Link:

Mastering Regular Expressions (2nd Edition)
Title:Mastering Regular Expressions (2nd Edition)
Author(s):Jeffrey E. F. Friedl
Publisher:O'Reilly Media
Reviewer:John Preece

This book will interest anyone who has an opportunity to use regular expressions. In particular, if you don't yet understand the power that regular expressions can provide, you should benefit greatly as a whole new world is opened up for you.

The book is aimed at the complete novice. I found that the first 3 chapters were relatively easy-going and very informative. I was able to follow all examples and the ideas being described. These chapters give you all that you need to know to create regular expressions that need to get the job done. It also gives you a sound base to look at existing regular expressions and understand what is happening.

Chapters 4 & 5 increase the pace several notches as it begins the central core of understanding regular expressions. These chapters I found really hard and laborious and would have benefited from more examples. Too much in-depth discussion regarding the intricacies of backtracking and greediness, together with the differing types between DFA and NFA, made it hard to understand how to implement them.

Chapter 6 describes the tool-specific information. Fairly straight forward as it does exactly what it says on the can.

Chapter 7 then expands on the previous chapter and describes in detail Perl Regular Expressions. It is the author's belief that regular expressions play a key role in virtually all Perl programs, which you are left feeling is true. He begins with an overall look at how Perl and regular expressions talk to each other then onto efficiency issues, which are full of examples, and then finally putting it together. The author concludes by looking at a few more examples, which helps put everything into perspective. The result is a 5,000 character long regular expression, which the reader, now full of confidence, should understand and manage.

There's a good reason that regular expressions are found in many diverse applications: they are extremely powerful. On one hand, a regular expression describes a chunk a text. You might use it to verify a user's input, or perhaps to sift through large amounts of data. On the other hand, regular expressions allow you to master your data, control it and put it to work for you.

To master regular expressions is to master your data.