This handy little book offers programmers a complete overview of the syntax and semantics of regular expressions that are at the heart of every text-processing application. Ideal as a quick reference, Regular Expression Pocket Reference covers the regular expression APIs for Perl 5.8, Ruby (including some upcoming 1.9 features), Java, PHP, .NET and C#, Python, vi, JavaScript, and the PCRE regular expression libraries.
This concise and easy-to-use reference puts a very powerful tool for manipulating text and data right at your fingertips. Composed of a mixture of symbols and text, regular expressions can be an outlet for creativity, for brilliant programming, and for the elegant solution. Regular Expression Pocket Reference offers an introduction to regular expressions, pattern matching, metacharacters, modes and constructs, and then provides separate sections for each of the language APIs, with complete regex listings including:
Supported metacharacters for each language API
Regular expression classes and interfaces for Ruby, Java, .NET, and C#
Regular expression operators for Perl 5.8
Regular expression module objects and functions for Python
Pattern-matching functions for PHP and the vi editor
Pattern-matching methods and objects for JavaScript
Unicode Support for each of the languages
With plenty of examples and other resources, Regular Expression Pocket Reference summarizes the complex rules for performing this critical text-processing function, and presents this often-confusing topic in a friendly and well-organized format. This guide makes an ideal on-the-job companion.
Tony Stubblebine is an Internet consultant, entrepreneur, and blogger. He's also the author of Regular Expression Pocket Reference, former Engineering Director for Odeo.com and former Engineering Lead for O'Reilly Media. He posts regular updates to his blog, StubbleBlog and regularly releases small websites such as Gem Jack, a repository of documentation for Ruby gems, Rate My Dance Moves, a YouTube mashup, and I Heart Quotes, the Unix fortune program re-imagined for the web.
Comments about oreilly Regular Expression Pocket Reference, Second Edition:
Contrary to what is implied in a previous review, this does actually include information about a C library: PCRE.
It's terse but concise. You do need to be familiar with the language or tool for each section that is being referred to, since the examples and notes assume a reasonable degree of familiarity with the concepts.
Excellent summary of the language specific libraries of you're already familiar with RE, but a terrible learning tool if you're not. Don't expect it to be that.
1/9/2010
3.0
this isn't serious
By Marc
from Canarias
About Me Developer
Pros
Concise
Cons
False front cover
Best Uses
Intermediate
Comments about oreilly Regular Expression Pocket Reference, Second Edition:
Its a great book, well written and very useful. But I don't know if is an errata, in the front cover you can read: Regular expressios for Perl, Ruby, PHP, Python, C... and here is the problem, in the index there ins't nothing about C.
9/4/2007
3.0
Good book for well-versed developers in multiple programming languages
By joshSVUG
from Undisclosed
Comments about oreilly Regular Expression Pocket Reference, Second Edition:
From the back cover of the Regular Expression Pocket Reference: "Ideal as a quick reference," and ", makes an ideal on-the-job companion." All this is true if you are well-versed in regular expressions and use multiple programming languages (and confuse the syntax).
I like the use of the same examples across programming languages (where applicable).
The recipes in the cookbook section are great, although I would have liked to see additional recipes (like stripping HTML tags, matching credit card numbers etc,). Of course the examples are endless and over time one builds his/her own recipe collection. At least this is a good place to start.
8/21/2007
4.0
The best regex ref available
By Brianary
from Undisclosed
Comments about oreilly Regular Expression Pocket Reference, Second Edition:
This book is the best regex ref I've seen.
The Introduction to Regular Expressions and Pattern Matching does an excellent job of covering the features common to most regex engines, plus the POSIX character classes and the Unicode properties, which I use infrequently enough that I can never remember. The recipes section will be extremely useful to those with limited experience.
The only regex engines not covered, that I know of, are the variants in the Windows findstr utility (a subset of stuff in the intro) and the bizarre dialect used by the VisualStudio editor.
The latter would be the most welcome addition, since I can never remember the syntax. I suspect it is completely different from any other regex syntax to facilitate searching and replacing text in .NET regular expressions, as well as code, though I'd much rather add the extra backslashes than try and get used to the idea of : as an escape character and { } for grouping.
This ref is otherwise definitive, in my experience. It even documents the upcoming changes in Perl 5.10 (separately from 5.8, which I am thankful for), such as named submatches.
Another critical piece of info included for each language is the raw string syntax (none for Java, alas, meaning a Java regex to match a Windows path has more backslashes than askaninja.com) -- essential for readable, maintainable regular expressions.
A book everyone should own.
7/30/2007
5.0
Excellent reference for regular expressions in several languages
By jdruin
from Undisclosed
Comments about oreilly Regular Expression Pocket Reference, Second Edition:
This book is the best reference for regular expressions. The second edition came out in July 2007 and has several updates over the previous version. The reason for the books ease-of-use lies in the organization. The chapters represent one language each. For each language, listings of the meta-characters and examples are shown. Depending on the language being displayed, there are other subjects covered such as unicode support, object orientation, and different topics unique to the language. The primary parsing engine is listed at the beggining of the chapters with the examples arranged at the ends of the chapters. I generally need to look up expression for JavaScript and .NET. Both of these are covered plus perl, java, php, python, ruby, pcre, apache, vi and shells. I just bookmark the 2 areas I need and I can lookup the expression listing in a few seconds.