Regular Expressions Cookbook

Regular Expressions Cookbook

4.0 2
by Jan Goyvaerts, Steven Levithan
     
 

View All Available Formats & Editions

Take the guesswork out of using regular expressions. With more than 140 practical recipes, this cookbook provides everything you need to solve a wide range of real-world problems. Novices will learn basic skills and tools, and programmers and experienced users will find a wealth of detail. Each recipe provides samples you can use right away.

This revised edition

Overview

Take the guesswork out of using regular expressions. With more than 140 practical recipes, this cookbook provides everything you need to solve a wide range of real-world problems. Novices will learn basic skills and tools, and programmers and experienced users will find a wealth of detail. Each recipe provides samples you can use right away.

This revised edition covers the regular expression flavors used by C#, Java, JavaScript, Perl, PHP, Python, Ruby, and VB.NET. You’ll learn powerful new tricks, avoid flavor-specific gotchas, and save valuable time with this huge library of practical solutions.

  • Learn regular expressions basics through a detailed tutorial
  • Use code listings to implement regular expressions with your language of choice
  • Understand how regular expressions differ from language to language
  • Handle common user input with recipes for validation and formatting
  • Find and manipulate words, special characters, and lines of text
  • Detect integers, floating-point numbers, and other numerical formats
  • Parse source code and process log files
  • Use regular expressions in URLs, paths, and IP addresses
  • Manipulate HTML, XML, and data exchange formats
  • Discover little-known regular expression tricks and techniques

Product Details

ISBN-13:
9781449319434
Publisher:
O'Reilly Media, Incorporated
Publication date:
09/03/2012
Edition description:
Second Edition
Pages:
612
Sales rank:
354,353
Product dimensions:
7.00(w) x 9.10(h) x 1.20(d)

Meet the Author

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.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >

Regular Expressions Cookbook 4 out of 5 based on 0 ratings. 2 reviews.
Dan007 More than 1 year ago
This book is not for a Regular Expressions Novice which I am. I was hoping for a book that would first explain the concepts and methodoligies before diving into examples. But based on the title of the book I should have know better. The cover states the there is a tutorial but I couldn't find it. Now that I have the bad part out of the way, the good part is that it gives you a tremendous amount of examples. So if you are looking for a book that gives you the answer on a specific expression this is the book for you.
INDEPENDENTREVIEWER More than 1 year ago
Do you regularly work with text on a computer? If you do, then this book is for you! Authors Jan Goyvaerts and Steven Levithan, have done an outstanding job of writing a book that shows you how you can use regular expressions in situations where people with limited regular expressions experience would normally say it can't be done. Goyvaerts and Levithan, begin by explaining the role of regular expressions and introduce a number of tools that will make it easier to learn, create, and debug them. Next, the authors cover each element and feature of regular expressions, along with important guidelines for effective use. Then, they specify coding techniques and include code listings for using regular expressions in each of the programming languages covered by this book. They continue by focusing on recipes for handling typical user input, such as dates, phone numbers, and postal codes in various countries. Next, the authors explore common text processing tasks, such as checking for lines that contain or fail to contain certain words. Then, they show you how to detect integers, floating-point numbers, and several other formats for this kind of input. The authors continue by showing you how to take apart and manipulate the strings commonly used on the Internet and Windows systems to find things. Finally, the authors cover the manipulation of HTML, XML, comma-separated values (CSV), and INI-style configuration files. This most excellent book shows you everything you need to know about regular expressions, and then some, regardless of whether you are a programmer. More importantly, if you read this book cover to cover, you'll become a world class chef of regular expressions.