Regular Expressions Cookbook

About the Book

If you're a programmer, you've undoubtedly needed to search or manipulate text at some point. Regular expressions provide a flexible and concise means to complete most such tasks. However, their power does not come without its problems. Regular expression syntax can be challenging for newcomers, and even seasoned users often have trouble tackling performance issues, the nuances of more advanced features, and matching precisely what they intend and nothing more. Additionally, while most regular expression flavors share a common set of basic syntax, more advanced features and APIs commonly differ. To help you overcome these challenges, this book provides 126 recipes written for today's most popular programming languages, including C#, Java, JavaScript, Perl, PHP, Python, Ruby, and VB.NET. In addition to providing regular expressions you will find useful, this book will deepen your understanding of the field and help you write better regular expressions for custom needs. If you've been using regular expressions for years, this book will help you advance to the next level. You'll learn powerful new tricks, steer clear of flavor-specific gotchas, and save valuable time with this huge library of proven solutions to difficult, real-world problems. The contents include a regular expression tutorial; using regular expressions in programming and scripting languages; validating and formatting input; words, lines, and special characters; numerical values; URLs and paths; markup and data interchange.

Feedback from Readers

"I received my copy of the regex cookbook (pre-ordered) and LOVE IT! It has completely changed my ability to understand regex and has revolutionized my day to day tasks. Your writing is brilliant, thank you."

-- Josh Wolfer, 29 June 2009, California, USA

"I'm really enjoying Regular Expressions Cookbook... got my copy last week and I'm finding interesting and different perspectives on problems I solve everyday in Perl... I've been using Perl and regexes for almost a dozen years now, and I have many of the same regex solutions as the cookbook, but every once in a while I'm seeing another way to do something! TIMTOWTDI! Thanks for a good contribution to the regex literature... the Cookbook goes well on my nightstand right next to Jeff Friedl's Mastering Regexes. BTW, I'll be getting another copy of the Cookbook to leave at the office for my team's reference."

-- Howard Maher, 15 June 2009, Texas, USA

Excerpt from Jeff's review Regular Expressions for Regular Programmers: "Although my expectations were high, I think this book has exceeded even the loftiest expectations I had. It is outstanding. Regular Expressions Cookbook manages to be simultaneously accessible and almost ridiculously comprehensive."

-- Jeff Atwood, 8 June 2009, California, USA

About the Authors

Jan Goyvaerts runs Just Great Software, where he designs and develops some of the most popular regular expression software. His products include RegexBuddy, the world's only regular expression editor that emulates the peculiarities of 15 regular expression flavors, and PowerGREP, the most feature-rich grep tool for Microsoft Windows.

Steven Levithan is a leading JavaScript regular expression expert and runs a popular regular expression centric blog. Expanding his knowledge of the regular expression flavor and library landscape has been one of his hobbies for the last several years.

Product Details

Paperback: 510 pages

Publisher: O'Reilly Media, Inc. (May 25, 2009)

Language: English

ISBN-10: 0596520689

ISBN-13: 978-0596520687

List price (USA): $44.99

Order Now!

Order Regular Expressions Cookbook from Amazon.com. Free shipping to the USA.

Order Regular Expressions Cookbook from Amazon.ca. Free shipping to Canada.

Order Regular Expressions Cookbook from Amazon.co.uk. Free shipping to the UK.

Order Regular Expressions Cookbook from Amazon.fr. Free shipping to France and Belgium.

Order Regular Expressions Cookbook from Amazon.de. Free shipping to Germany, Austria, Switzerland, and Luxembourg.

Order Regular Expressions Cookbook from Amazon.co.jp. Free shipping to Japan.