Advanced Search
Start Your Free Trial

Overview

Other Readers Also Read...
bash Cookbook, 1st Edition

bash Cookbook, 1st Edition
by Carl Albing; JP Vossen; Cameron Newham

Perl Cookbook, 2nd Edition

Perl Cookbook, 2nd Edition
by Tom Christiansen; Nat Torkington

Top Sellers in this Category

Head First Java, 2nd Edition

Head First Java, 2nd Edition
by Kathy Sierra; Bert Bates

Head First Design Patterns

Head First Design Patterns
by Eric Freeman; Elisabeth Robson; Kathy Sierra; Bert Bates

Java Concurrency in Practice

Java Concurrency in Practice
by Brian Goetz; Tim Peierls; Joshua Bloch; Joseph Bowbeer; David Holmes; Doug Lea

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.

Amazon.com® Reader Reviews (Ranked by Helpfulness)

Average Amazon.com® Rating: 4.5 out of 5 rating Based on 20 Ratings

Very useful and clear - 2010-01-29
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I have a copy of Mastering Regular Expressions by Jeffrey E. F. Friedl on my bookshelf. I bought it a long time ago to try to improve my skills at using regular expressions to search text and check input against desired norms. While that book is clear and well written, I am sometimes a bit impatient and it was taking too long for me to figure out how to do the things I wanted to do and I got distracted or busy before I read enough to complete the task (I ended up using Google and finding what I needed quickly). I have to admit that I still don't have the regular expression skills I want to have, although this book promises to teach them to me. Someday it may do so.

What I was looking for was a book that would teach regular expressions while giving concrete examples of real life use cases that I could immediately put to work. This book is filled with them.

Chapters one and two lay the foundation by covering the basics of what regular expressions are, using them to search and replace, match text, and other basic skills. This is good, but where the book really sets itself apart is in chapters three through eight, which are overflowing with useful recipes for things like validating ISBNs, finding URLs within text, stripping leading zeros or matching IP addresses (IPv4 and IPv6). The book has an obvious organization scheme, a ton of useful recipes, and a useful index. Finding what you want or need is very easy to do, and unless your needs are especially unique or esoteric, you will probably discover exactly what you require in the book.

The best part of the book is that every example uses a clear format that sets the stage for an easy discovery of needed information.

First, a problem is stated, such as in chapter four's item, 4.1 Validate Email Addresses, which says, "You have a form on your website or a dialog box in your application that asks the user for an email address. You want to use a regular expression to validate this email address before trying to send email to it. This reduces the number of emails returned to you as undeliverable."

Next, a solution is defined, with code examples, accompanied by a description of the particular details that are vital to comprehend when implementing the solution. Next, each recipe has a section for further discussion that leads to a deeper understanding of the regular expression being used and the context in which it is being used.

Especially wonderful is that every recipe has very specific and clear code examples for use with Perl, PCRE (the "Perl Compatible Regular Expressions" library for C, which isn't identical to Perl's use of regular expressions, even though it tries), .NET, Java, JavaScript, Python, PHP, and Ruby with notes on which specific release versions or variations of each are covered. When differences exist in the implementation in these environments, those differences are clearly noted and discussed. This feature will make life much easier for people who need to use regular expressions in more than one language context and is a feature of the book I appreciate greatly.

The other regex book on my shelf will remain there until that mystical moment "when I have time to study it." This book will be used regularly as a reference.

Thank you and bravo to Steven Levithan and Jan Goyvaerts - 2009-09-21
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I am not a great regular expressions expert rather a beginner in some ways but this book is definitely well organized and is one of the best I have ever seen for finding solutions in using regular expressions with a good well organized library of formulas in several programming and scripting languages as well as some pretty advance topics this book has something that could benefit everyone using it.
I don't have enough stars to accurately give toward this book.
Thank you and bravo to Steven Levithan and Jan Goyvaerts

Regular Expressions Can be complicated - 2010-01-03
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
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.

Learn how to format input, manage lines, find solutions for common markups and paths, and more - 2009-10-13
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Jan Goyvaerts' and Steven Levithan's REGULAR EXPRESSIONS COOKBOOK provides over 100 recipes to help blend data and text with regular expressions, offering programmers and software development collections a powerful set of step-by-step instructions for using C#, Java, Perl, Python and VB.Net, among others. Learn how to format input, manage lines, find solutions for common markups and paths, and more in this advanced programmer's cookbook of basics.

For Only $30 It'll Pay For Itself In One Use - 2009-10-11
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This is the kind of book one doesn't actually read (unless you're a masochist ;-), but is essential to have around. Let's face it, very few of us are good with regular expressions. If you aren't using them every day (which most of us aren't) they are just some kind of black-magic stuff we need to do every now and then.

From what I've seen the examples and explanations are clearly written, and the fact that they show - and explain - solutions for Perl, .NET, Java, JavaScript, Python and Ruby makes this book too good to pass up.

Some information on this page was provided using data from Amazon.com®. View at Amazon >


About Safari Books Online • Terms of Service • Privacy Policy • Contact Us • Corporate Licenses • Help • Accessibility | See us on FacebookSee us on Linked InSee us on TwitterRSS

Copyright 2010 Safari Books Online. All rights reserved.