Friday, January 18, 2013

Book Review – Regular Expressions Cookbook 2nd Jan Goyvaerts and Steven Levithan; O'Reilly Media

Software developers and programmers alike, Goyvaerts and Levithan present the second edition of Regular Expressions Cookbook having worked extensively with regular expressions and having equipped regular expression practitioners with handy tools such as RegexPal and RegexBuddy. I encountered this book as I first became aware both of the power of regular expressions and of the necessity of my using them in several projects at work.

This circa 600 page book is by no means a “sit down and read it” text. The first two chapters, however, provide an excellent overview of regular expressions as a concept and numerous introductory walkthrough examples of basic regular expression problems to solve. Chapter 3 focuses on utilizing regular expressions within the nuances of eight programming languages. The remainder of the book delves into specific features/applications of regular expressions in depth. For example, chapters are provided on using regular expressions with Source Code and Log Files; URLs, Paths, and Internet Addresses; and Markup and Data Formats as well as within the broader contexts of numbers and text.

The recipe format of this text is like reading case studies where a problem is outlined and one or more solutions are offered, along with a discussion for clarification. Specific programming languages are also addressed to demonstrate the development of the appropriate regular expression in that particular context. This consistent format makes each recipe that much easier to understand. This book is well cross-referenced, with the added bonus of hyperlinked cross-references in the PDF version.

Regular Expressions Cookbook 2nd ed. has undoubtedly assisted me in learning and utilizing regular expressions at work. It has proven useful both as an initial introduction to regular expressions but also as an ongoing go-to reference. I would like to see the third edition of this book include appendices with language-specific cheat sheets or summary tables for quick reference. An appendix summarizing ASCII characters and Unicode categories (already included as a table within the text) would also be appreciated. All in all, this cookbook is one of few books in my programming collection that I consider to be essential. I recommend it both for beginners (who shouldn’t allow themselves to be intimidated by its depth) and for experienced programmers who need something to which they can refer when necessary.

O'Reilly Media provided me with a free electronic copy of this book. Learn more about Regular Expressions Cookbook 2nd ed. at

No comments:

Post a Comment

Please leave useful comments. Constructive criticism welcomed.