Back
Jeffrey Friedl: Mastering Regular Expressions (Paperback, 2006, O'Reilly Media, Inc.) 4 stars

Regular expressions are an extremely powerful tool for manipulating text and data. They are now …

Review of 'Mastering Regular Expressions' on 'Goodreads'

4 stars

The book cleared a lot of fog in my understanding of regular expressions. I knew they're based on finite automata theory (from this excellent book, which I highly recommend). I thought DFAs and NFAs are equivalent in power and different regular expression engines just implement their own translations of regexes to those NFA or DFA forms. It turned out, modern regular expressions much, much more powerful than NFAs. This book explains why. As a side effect, it helps to understand how to craft correct and efficient regular expression. Even for the POSIX NFA engine.

I wasn't sure about the interaction of regular expressions with language around them. This includes escaping rules, regex engine types and so on. There's a lot of examples in different languages so you can really feel the difference between regex flavors.

I didn't read the whole book, the second half is about guts of languages I never use nor plan to use (Perl, PHP, .Net).

-1 star for silly examples. Who's gonna parse HTML or even URLs using regular expressions? It's a minefield.