View Review Details


Book:   Mastering Regular Expressions
Subject:   Mastering Regular Expressions, 2nd Edition Review
Date:   2002-10-13 18:28:33
From:   Larry Bezeau
Rating:  StarStarStarStarStar

The second edition of Mastering Regular Expressions is


undoubtedly the most thorough and unified coverage of this important


topic. A treatise such as this is appropriate in light of the large


number of programs, both interactive and command line, that use regular


expressions with feature sets that vary from program to program. Many


references on specific languages contain chapters on the use of regular


expressions within the language, but they lack the unifying thrust of


this book. Friedl's book also considers the issue of efficiency in the


use of regular expressions, a topic not normally examined elsewhere.


The book covers regular expressions in general followed by specific


coverage of regular expressions in three languages, Perl, Java, and .net.


A major omission here in my view is JavaScript. The newer versions of


JavaScript have a powerful regular expression capability and, unlike the


other languages considered, JavaScript occurs in a context where there is


no other choice of language, in interactive pages in web browsers. Another


language that gets short-changed is TCL (Tool Command Language) which has


a very powerful and efficient regular expression capability. My own


perference would have been for coverage of these two languages over the


the three chosen by the author.


There is a chapter on solving practical problems but I would have preferred even more on this topic. Little mention is made of utilities


such as sed that depend entirely on regular expressions for their usefulness.


To the author's credit, he does document carefully many of the traps into


which regular expression programmers frequently fall.


Many consider regular expressions to be inelegant but they are


much more concise than the alternatives and are often used where there


is no other reasonable choice. If you find yourself in this situation,


and especially if you are using regular expressions in more than one


language or utility, you will benefit from reading this book. It is


well organized and readable.


Larry Bezeau


University of New Brunswick


See larger cover