Sunday, February 23, 2014

Review of Regular Expressions Cookbook 2ed by J. Goyvaerts and S. Leviathan, publisher O'Reilly.

The subtitle of the book is "Detailed Solutions in Eight Programming Languages". Those eight languages are C#, Java, JavaScript, Perl, PHP, Python, Ruby, and VB.NET. This shows the major issue which I have with the book: no C++ even though C++11 standard brought built in regex support. The standard was approved on 2011 and book was released 2012, so it should have been incorporated, but there is only slight hint of it, Boost-, and PCRE-libraries in few paragraphs covering C and C++.

Nevertheless the book is still very useful for C++ programmers as the recipes are about regular expressions and the languages are in a side role. (Though there are things which are easier with some languages and some things are harder with other languages, and the examples show this nicely.)

I always find it praiseworthy to say that the description of the book on the O'Reilly page and the back cover text of the book are in harmony with the actual contents of the book. There is also a sampler with a full index of the book, and an introductory chapter available on O'Reilly site, so I'll skip most these in this review. The book covers multiple regex "dialects" and on every recipe it tells what works in which dialect if there are differences. The book also follows the standard O'Reilly notation and it is also easy to see if text in question is example or normal text. In pdf version the working links in text are nice addition as the book is 600+ pages and browsing it is a bit of work.

Each recipe starts with problem description, next in line are the solutions in multiple languages and dialects (if needed), then comes discussion section explaining the solution and possible issues and finally see also section with links to other recipes with similarities to recipe in question. The book starts from basic regex skills so novices get full benefit of the book but it also covers rather complex regex tasks so I'd say that even seasoned regex users can benefit from the book, especially if they are forced to change regex dialect they have been using.

I'll give 4/5 with recommendations to get it if you need to parse through text.

I received this book for review purposes via O'Reilly blogger review program.

No comments:

Post a Comment