Regular Expressions Cookbook (Google eBook)

Front Cover
"O'Reilly Media, Inc.", May 22, 2009 - Computers - 510 pages
3 Reviews

This cookbook provides more than 100 recipes to help you crunch data and manipulate text with regular expressions. Every programmer can find uses for regular expressions, but their power doesn't come worry-free. Even seasoned users often suffer from poor performance, false positives, false negatives, or perplexing bugs. Regular Expressions Cookbook offers step-by-step instructions for some of the most common tasks involving this tool, with recipes for C#, Java, JavaScript, Perl, PHP, Python, Ruby, and VB.NET.

With this book, you will:

  • Understand the basics of regular expressions through a concise tutorial
  • Use regular expressions effectively in several programming and scripting languages
  • Learn how to validate and format input
  • Manage words, lines, special characters, and numerical values
  • Find solutions for using regular expressions in URLs, paths, markup, and data exchange
  • Learn the nuances of more advanced regex features
  • Understand how regular expressions' APIs, syntax, and behavior differ from language to language
  • Write better regular expressions for custom needs

Whether you're a novice or an experienced user, Regular Expressions Cookbook will help deepen your knowledge of this unique and irreplaceable tool. You'll learn powerful new tricks, avoid language-specific gotchas, and save valuable time with this huge library of proven solutions to difficult, real-world problems.

  

What people are saying - Write a review

Review: Regular Expressions Cookbook

User Review  - John - Goodreads

so many ways of using regular expressions. Read full review

Review: Regular Expressions Cookbook

User Review  - Rohan - Goodreads

A very practical approach, especially the language specific caveats.. Read full review

Contents

Chapter 1 Introduction to Regular Expressions
1
Chapter 2 Basic Regular Expression Skills
25
Chapter 3 Programming with Regular Expressions
95
Chapter 4 Validation and Formatting
213
Chapter 5 Words Lines and Special Characters
285
Chapter 6 Numbers
323
Chapter 7 URLs Paths and Internet Addresses
347
Chapter 8 Markup and Data Interchange
411
Index
479
Copyright

Common terms and phrases

About the author (2009)

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.

Steve Levithan works at Facebook as a JavaScript engineer. He has enjoyed programming for nearly 15 years, working in Tokyo, Washington D.C., Baghdad, and Silicon Valley. Steven is a leading JavaScript regular expression expert, and has created a variety of open source regular expression tools including RegexPal and the XRegExp library.

Bibliographic information