View Review Details


Book:   Regular Expression Pocket Reference
Subject:   The best regex ref available
Date:   2007-08-21 10:30:39
From:   Brianary
Rating:  StarStarStarStarStar

This book is the best regex ref I've seen.


The Introduction to Regular Expressions and Pattern Matching does an excellent job of covering the features common to most regex engines, plus the POSIX character classes and the Unicode properties, which I use infrequently enough that I can never remember. The recipes section will be extremely useful to those with limited experience.


The only regex engines not covered, that I know of, are the variants in the Windows findstr utility (a subset of stuff in the intro) and the bizarre dialect used by the VisualStudio editor.


The latter would be the most welcome addition, since I can never remember the syntax. I suspect it is completely different from any other regex syntax to facilitate searching and replacing text in .NET regular expressions, as well as code, though I'd much rather add the extra backslashes than try and get used to the idea of : as an escape character and { } for grouping.


This ref is otherwise definitive, in my experience. It even documents the upcoming changes in Perl 5.10 (separately from 5.8, which I am thankful for), such as named submatches.


Another critical piece of info included for each language is the raw string syntax (none for Java, alas, meaning a Java regex to match a Windows path has more backslashes than askaninja.com) -- essential for readable, maintainable regular expressions.


A book everyone should own.


Browse within this book

"Regular expressions have proven so popular that they have been incorporated into most if not all major programming languages and editors, and even at least one Web server. But each one implements regular expressions in its own way — which is reason enough for programmers to appreciate the latest edition of Regular Expression Pocket Reference by Tony Stubblebine."
--Michael J. Ross, Web Developer, Slashdot.org