ISBN: 0672325667
Pages: 150
Publisher: Sams – February 28, 2004

This title is out of date, and has been replaced by Learning Regular Expressions.

Regular expressions and the regular expression language have been around for many years. Regular expression experts have long been armed with an incredibly powerful tool, one that can be used to perform all sorts of powerful text processing and manipulation in just about every language and on every platform.

That’s the good news. The bad news is that for too long, regular expressions have been the exclusive property of only the most tech savvy. Most of us do not fully understand what regular expressions do and what problems they solve. And those who have braved them find regular expression syntax to be unintuitive, and even convoluted at times. That’s sad, because the truth is that regular expressions are nowhere near as complex as they appear to be at first glance. All it takes is a clear understanding of the problem being solved and how to leverage regular expressions so as to solve them.

Part of the problem is the scarcity of quality content on the subject. The few books on regular expressions (and indeed, most of the Web sites boasting regular expression tutorials) tend to concentrate on the syntax, defining what { does and how + differs from *. But that is the easy part; there are not that many special characters in the regular expression language. The tricky part is understanding how they should be used so as to solve real-world problems. If you need to get up and running quickly using regular expressions, you’ll find yourself torn between having too little information to be productive and having too much information to know where to begin.

And that is where this book comes in. Sams Teach Yourself Regular Expressions in 10 Minutes will teach you the regular expressions that you really need to know, starting with simple text matches and working up to more complex topics, including the use of backreferences, conditional evaluation, and look-ahead processing. You’ll learn what you can use, and you’ll learn it methodically, systematically, and simply by using clear and practical examples and solving real problems – all in lessons that will each take 10 minutes or less to complete.

To determine if this book is for you, answer these questions: Are you new to regular expressions? Do you want to quickly learn how to get the most out of the regular expression language? Do you want to gain an edge by learning to solve real problems using one of the most powerful (and least understood) tools available to you? Do you build Web applications and crave more sophisticated form and text processing? Are you are a developer (using Perl, ASP, Visual Basic, .NET, C#, Java, JSP, PHP, ColdFusion, and many other languages) and want to learn how to use regular expressions within your own application development? Do you want to be productive quickly and easily in regular expressions without having to call someone for help? If you answered yes to any of these questions, you’ll find this little book to be exactly what you’ve been looking for.


Chapter listing

  • Introduction
  • 1: Introducing Regular Expressions
  • 2: Matching Single Characters
  • 3: Matching Sets of Characters
  • 4: Using Metacharacters
  • 5: Repeating Matches
  • 6: Position Matching
  • 7: Using Subexpressions
  • 8: Using Backreferences
  • 9: Looking Ahead and Behind
  • 10: Embedding Conditions
  • Appendix A: Using Popular Applications and Languages
  • Appendix B: Regular Expression Solutions to Common Problems
  • Appendix C: The Regular Expression Tester Introduction


There is an errata available for this title.


Supporting Resources

Appendix C

Appendix C: The Regular Expression Tester describes a simple RegEx testing application that you may use to follow along with the examples in this book. Click on the links below to download any version (use the JavaScript version for browser-only testing, without needing any back-end processing):

If you would like to port the tester to any other language or platform, please let me know.

Other Editions Of This Title