Wednesday, February 07, 2007

Book Review: Mastering Regular Expressions, 3rd Edition

Mastering Regular Expressions,3rd. ed. by Jeffrey Friedl, ISBN 0596528124

I was a proud owner of the first edition of Jeffrey Friedl’s great book on regular expressions and like so many other readers I found it to be a very profound work which drastically changed how I approached all manners of text-related tasks.  Regular expressions are a vital piece of being able to do amazing work with blocks of text.  Need to transform CSV tables from one format to another?  Easy.  Need to parse out content from logfiles?  Easy.  Need to prototype an SGML to XML converter?  Not so easy, but doable.  (I know, because I did that some time ago…)

Friedl’s book is very conversational in tone, and he’s great at explaining all the minutia in regular expressions which can positively bite one in the keester.  Friedl’s adamant that the book isn’t a reference, it’s a tome for mastering regular expressions.  That’s emphasized repeatedly throughout the book, almost becoming annoying at times.  You really do need to start at the beginning and work your way through the book in order to get the best out of it.

What I find particularly interesting and helpful are the very clear explanations of the differences between the various regex implementations.  I cut my regex teeth in the *nix world via sed, grep, and a bunch of other similar fun tools.  Then I moved into the .NET world and completely lost my mojo where regexes were concerned.  Friedl’s clear explanations of how regexes work in .NET are making my regex mojo feel much better these days. (But I still happily fire up GVim to get powerful regex work done.)

Mastering Regular Expressions really is a vital addition to one’s bookshelf.

(Standard book review disclaimer.)

No comments:

Subscribe (RSS)

The Leadership Journey