The Virtual Bookcase Reviews of 'Mastering Regular Expressions':
Reviewer amazon.com wrote:Regular expressions are a central element of UNIX utilities like egrep and programming languages such as Perl. But whether you're a
UNIX user or not, you can benefit from a better understanding of regular expressions since they work with applications ranging from
validating data-entry fields to manipulating information in multimegabyte text files. Mastering Regular Expressions quickly covers the
basics of regular-expression syntax, then delves into the mechanics of expression-processing, common pitfalls, performance issues,
and implementation-specific differences. Written in an engaging style and sprinkled with solutions to complex real-world problems,
Mastering Regular Expressions offers a wealth information that you can put to immediate use.
Reviewer amazon.co.uk wrote:Regular expressions--it sounds fairly ordinary in a regular sort of way, so therefore it must be very simple and very straightforward, right? Not
quite.
The simple name hides an incredible amount of power when handling textual data with scripting languages such as Perl, Python and awk and
more and the programmer that can master regular expressions can master just about anything.
From the off it's necessary to congratulate author Jeffrey Friedl on doing a superb job of asking what can be a very complex subject and
breaking it down into digestible chunks that almost anyone can understand.
From the basics of character and pattern matching through to the recognition of complex string patterns and multiple character replacements to
"greedy" metacharacters and how to curb their appetite, this is about as comprehensive as it gets.
With a handful of latter chapters devoted to the differences between scripting languages and the way in which they deal with regular
expressions and so many examples it'll make your eyes water there's something here for everyone.
So, if you can examine a string like this "(\.|[^"\])*" and know what it does and how it does it there's plenty of reference material in here for
those odd moments when you need a refresher. If, however, you've no idea what the above means, and you need the ability to handle textual
data, buy this book. Now!
Reviewer Koos van den Hout wrote:Regular expressions (regexps) are very powerfull tools for string matching if you have the knowledge. This book explains them very thoroughly including detailing how the expressions get matched and how a regexp engine works which aids a lot in understanding.
Reviewer Rob Slade wrote:
Novice DOS users tend to find out reasonably quickly that "*.*", when used as
an argument with the delete command, means "everything". Intermediate users
will have found that "?????.exe" matches programs with filenames under six
characters long, and that "*." finds directories (since novices usually don't
give directory names extensions). (When I sent him the first draft of this
review, Friedl and I argued back and forth over whether if you want to find a
file which has "LAN" somewhere in the name you need to use "?????LAN?????.*".
He's right and I was wrong: that's wrong. But both of us can remember some
system where it works.) DOS wildcards, though, are only the crudest
approximation to the power of the algorithmic matching that can be done with
regular expressions most widely known in relation to UNIX and UNIX derived
applications.
As the author points out, documentation on regular expressions is abundant, but
not very good. In addition, there are differences between the use of regular
expressions in different applications and different versions of the same
application.
Friedl provides a realistic, reliable, and very readable introduction and
overview of the topic. The use of humour not only leavens the text, but
supports the concepts being addressed. The material is comprehensive, and
covers differences in the use of regular expressions both in sections dealing
with specific functions, and in a separate chapter which details usage in awk,
Tcl, and emacs. (Perl gets a chapter all to itself.) Readers may pursue the
topic as they wish, of course, but Friedl's offer of mastery extends to a
chapter on *how* matching is done: the internals of regular expressions.
Definitely, a valuable addition to the UNIX bookshelf, and also of use to those
working with grep, awk, Perl and the like on other platforms. Or in any
situation where regular expressions are used.
copyright Robert M. Slade, 1997
Add my review for Mastering Regular Expressions