Chapter 10. Resources

The ultimate regular expression resource in print is Mastering Regular Expressions, Third Edition by Jeffrey Friedl (2006, O'Reilly). This excellent book deals with many technical aspects of regular expressions in great detail, providing a wealth of information. Surprisingly, it has nothing to say about JavaScript, only about other scripting/programming languages. Most of the examples are easily transferred to JavaScript, though. JavaScript, Fifth Edition by David Flanagan (2006, O'Reilly) has a useful chapter on regular expressions in JavaScript, and is otherwise an excellent source for JavaScript. Regular Expression: Pocket Reference by Tony Stubblebine (2003, O'Reilly) is a handy little book, summarizing regular expression syntax of several script languages, including JavaScript.

There are quite a lot of online resources. The three best are Netscape's online JavaScript reference, which has an overview of regex syntax specific for JavaScript and some useful examples. Another good JavaScript regex source is http://www.devguru.com/technologies/JavaScript/11284.asp. An excellent general regex resource is http://www.regular-expressions.info/, which has a good tutorial. This site also has a useful section with reviews of some books on regular expressions, and the site's author, Jan Goyvaerts, now also offers the online tutorial as a book, which can be bought in print or as a PDF (http://www.lulu.com/content/229786).

A general introduction to scripting with JavaScript ...

Get Automating InDesign with Regular Expressions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.