UKUUG home


(the UK's Unix & Open Systems User Group)






Book Discounts

Other Discounts

Mailing lists






Mastering Regular Expressions (2nd Edition) Jeffrey EF Friedl
Published by O'Reilly and Associates
484 pages
£ 28.50
Published: August 2002
reviewed by Sam Smith
   in the September 2003 issue (pdf), (html)

In the five years since the first edition of Mastering Regular Expressions was released, there has been an expansion in the languages and tools people use. Languages such as VB.NET, C#, PHP, Java, Ruby and Python, if they did exist then, were nowhere near as widely used then as they are today. The update to the book, consisting of roughly 200 new pages, and a thorough update of the rest reflects the fact that times have changed.

Regular expressions are built into the above six languages; and Mastering Regular Expressions covers them all reasonably well. This includes comparisons of RE constructs which are available in each language, and examples of tasks where one is better than another. The book also covers well how and why regular expression engines actually work in addition to how to optimise your expressions for maximum speed or effect. Perhaps more importantly it also covers how not to "optimise" your expression wrongly. The book deals with its topic material well and thoroughly. It is not a tutorial on how to write regular expressions in a single language, but a guide on the overarching aims and supporting theories of regular expressions, and their use; while also including a large number of useful examples.

I should also mention Perl at some point in this review. While MRE has the colour scheme from O'Reilly which makes it look like a Perl book, Perl is, in large sections of the text, treated just as another language under discussion. Where there are features of Perl regular expressions that are only found in Perl, these are covered; as where there are features only found in one of the other languages being discussed.

Overall, the book is a useful addition to the bookshelf if you sometimes find yourself having to mangle some text in a less than entirely straightforward manner. It doesn't matter whether you have to break out the man page for the syntax of grep(1) or can type out multi-line expressions straight, there is still something in here for you.

Back to reviews list

Tel: 01763 273 475
Fax: 01763 273 255
Web: Webmaster
Queries: Ask Here
Join UKUUG Today!

UKUUG Secretariat
More information

Page last modified 03 Apr 2007
Copyright © 1995-2011 UKUUG Ltd.