<pre>
Review by : Ernest Friedman-Hill
Rating : 9 horseshoes</pre>
An old-fashioned regular expressions education starts with a Big Scary Table listing every metacharacter. Newbies often run away screaming when faced with this explosion of punctuation, never to return.
Help has arrived in this small, accessible book. Rather than starting out with the Big Scary Table, Habibi appeals to the reader's intuition, and demonstrates several regex applications before even mentioning punctuation marks. By the time that fragments of the Big Scary Table do arrive, the reader has already seen fully worked examples and learned techniques for developing a regular expression for a given problem.
Instead of the Big Scary Table, this book uses small tables that make understanding complex regular expressions easy. There are tables which break up regular expressions into pieces, each row pairing one chunk of the expression with a clear explanation. Other tables show the steps involved in developing a complex regex. The honest explanation of each step makes these tables valuable real-life case studies.
After describing regular expressions themselves, the book presents a practical overview of the java.util.regex API. There's also a separate chapter on advanced features, and a final chapter showing fully-worked practical applications.
The only flaw in this book is a slight bias toward Java on Windows systems. A reader working the examples on Linux would have minor problems the author doesn't mention.
Overall, I'd strongly recommend this book to anyone new to java.util.regex, whether or not they have previous regular expressions experience.
More info at Amazon.com More info at Amazon.co.uk