Quick Start
Tutorial
Tools & Languages
Examples
Reference
Book Reviews
Book Reviews
Regular Expr. Cookbook
Teach Yourself Reg. Expr.
Mastering Regular Expr.
Java Regular Expressions
Oracle Regular Expr.
Regular Expr. Pocket Ref.
Regular Expr. Recipes
Regex Recipes for Windows
More on This Site
Introduction
Regular Expressions Quick Start
Regular Expressions Tutorial
Replacement Strings Tutorial
Applications and Languages
Regular Expressions Examples
Regular Expressions Reference
Replacement Strings Reference
Book Reviews
Printable PDF
About This Site
RSS Feed & Blog
RegexBuddy—Better than a regular expression tutorial!

Sams Teach Yourself Regular Expressions in 10 Minutes

Don’t be fooled by the book’s catchy title, obviously courtesy of Sams marketing department. Just reading through the book’s 138 pages will take more than 10 minutes. But if you’re willing to sit down with this book for an hour or two, you can certainly learn to write regular expressions that do what you want.

The book consist entirely of a gently paced tutorial that walks you through all the elements of the regular expression syntax, starting out with the most basic elements, advancing all the way to advanced features such as lookaround and conditionals. Each chapter introduces one element, clearly describing it, with several detailed examples. Almost all features of Perl-compatible regular expressions (also used by PHP, Python, JavaScript, Java, .NET, etc.) are discussed.

Obviously, such a small book cannot be comprehensive. Even though the book’s cover mentions a variety of programming languages, the book does not tell you at all how to actually use regular expressions with particular programming languages or tools. For that, you’ll need to refer to the documentation that comes with the software you’re using.

The book also doesn’t explain regular expression features such as matching Unicode characters or named capture. These features are only supported by a small number of regular expression flavors.

If you’re completely new to regular expressions, Sams Teach Yourself Regular Expressions in 10 Minutes will get you up to speed quickly. I would definitely recommend you get yourself a copy. But if you’re already familiar with regular expressions, you’ll need to look elsewhere for in-depth information.