O’Reilly Media, May 2009, Pages 512, First Edition.
In the context of this book, a regular expression is a specific kind of text pattern that
you can use with many modern applications and programming languages. You can use
them to verify whether input fits into the text pattern, to find text that matches the
pattern within a larger body of text, to replace text matching the pattern with other
text or rearranged bits of the matched text, to split a block of text into a list of subtexts, and to shoot yourself in the foot. This book helps you understand exactly what you’re doing and avoid disaster.
You should read this book if you regularly work with text on a computer, whether that’s searching through a pile of documents, manipulating text in a text editor, or developing software that needs to search through or manipulate text. Regular expressions are an excellent tool for the job. Regular Expressions Cookbook teaches you everything you need to know about regular expressions. You don’t need any prior experience whatsoever, because we explain even the most basic aspects of regular expressions.
This book teaches you everything you need to know about regular expressions and then
some, regardless of whether you are a programmer. If you want to use regular expressions with a text editor, search tool, or any application with an input box labeled regex, you can read this book with no programming experience at all. Most of the recipes in this book have solutions purely based on one or more regular expressions.
If you are a programmer, Chapter 3 provides all the information you need to implement
regular expressions in your source code. This chapter assumes you’re familiar with the
basic language features of the programming language of your choice, but it does not
assume you have ever used a regular expression in your source code.