TechBookReport logo

Keywords: Regular expressions, tutorial

Title: Regular Expressions In 10 Minutes

Author: Ben Forta

Publisher: SAMS Publishing

ISBN: 0672325667

Media: Book

Level: Beginner

Verdict: A pretty good introduction

Ben Forta introduces the reader to regular expressions in 10 very focused bite-sized chapters. Starting with a basic introduction in chapter one, the book progresses very quickly, covering everything from meta-characters to repeating groups, sub-expressions, back-references and more.

Each chapter focuses on a single topic, with an emphasis on a small set of examples that are clearly presented and which serve to illustrate the points being made in the text. The examples are of the sort that are likely to crop up in the real-world rather than contrivances that don't make much sense in isolation. The layout of the text helps as well, with the presentation organised so that it's easy to see at a glance what is going on.

As a single volume introduction the book works well-enough. The focus is firmly on the practical, so in depth discussions of finite state machines and the like are notably absent. Also the text tries to steer an agnostic course through the various implementations of regular expressions in Perl, JavaScript, Python, Java, C# and so on. A quick over-view of these different implementations is included in an appendix, though it doesn't come near the detail included in Tony Stubblebine's 'Regular Expression Pocket Reference'.

Two other appendices are included with the book. The first provides a cookbook for solving a number of common regex tasks: validating email addresses, phone numbers etc. A final appendix describes a downloadable regex testing application. Seeing as learning by doing is one of the best ways of learning, then a regex test tool ought to be obligatory for anyone reading this book, and having a downloadable tool makes a lot of sense. Finally, the inside covers provide a handy reference to regex metacharacters, again adding value to the book.

This is a first edition, so the inevitable text gremlins do intrude at times. In a couple of places the results don't match the regular expression, but these are relatively easy to spot. A list of errata are included on the author's web site.

In conclusion the book provides a painless way into regular expressions. It takes a simple approach and keeps focused on showing how to get the job done. If you're already a regex regular then the chances are that there's not much new here for you, but if you're just starting out then this is a pretty good place to start.

Hit the 'back' key in your browser to return to subject index page

Return to home page