Mastering Regular Expressions

by O'Reilly

$34.95
buy from amazon.com
Average Rating: * * * * half star
Sales Rank:595912 (lower is better)
Price Used:$2.48
Shipping:Free Shipping on most orders over $25*
Availability:
Label:O'Reilly
UPC:636920922575
Pages:342
Binding:Paperback
Publication Date:1997-01-15
Published By:O'Reilly
ASIN:1565922573
Category:Book

Authors

Editorial Reviews and Product Descriptions

Product Description

Regular expressions are a powerful tool for manipulating text and data. If you don't use them yet, you will discover in this book a whole new world of mastery over your data. If you already use them, you'll appreciate this book's unprecedented detail and breadth of coverage. If you think you know all you need to know about regular expressions, this book is a stunning eye-opener.

With regular expressions, you can save yourself time and aggravation while dealing with documents, mail messages, log files -- you name it -- any type of text or data. For example, regular expressions can play a vital role in constructing a World Wide Web CGI script, which can involve text and data of all sorts.

Regular expressions are not a tool in and of themselves, but are included as part of a larger utility. The classic example is grep. These days, regular expressions can be found everywhere, such as in:

  • Scripting languages (including Perl, Tcl, awk, and Python)
  • Editors (including Emacs, vi, and Nisus Writer)
  • Programming environments (including Delphi and Visual C++)

While many of these tools originated on UNIX, they are now available for a wide variety of platforms, including DOS/Windows and MacOS, so you can use them in your home environment. Additionally, many favorite programming languages offer regular-expression libraries, so you can include support for them in your own programs, and yes, even applets.

There can be certain subtle, but valuable, ways to think when you're using regular expressions, and these can be taught. Jeffrey Friedl has spent years helping people on the Net understand and use regular expressions. In this book he leads you through the steps of knowing exactly how to craft a regular expression to get the job done.

Regular expressions are not used in a vacuum. In this book, a variety of tools are examined and used in an extensive array of examples, with a major focus on Perl. Perl is extremely well endowed with rich and expressive regular expressions. Yet what is power in the hands of an expert can be fraught with peril for the unwary. This book will help you navigate the minefield to becoming an expert.

Amazon.com

Regular expressions are a central element of UNIX utilities like egrep and programming languages such as Perl. But whether you're a UNIX user or not, you can benefit from a better understanding of regular expressions since they work with applications ranging from validating data-entry fields to manipulating information in multimegabyte text files. Mastering Regular Expressions quickly covers the basics of regular-expression syntax, then delves into the mechanics of expression-processing, common pitfalls, performance issues, and implementation-specific differences. Written in an engaging style and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions offers a wealth information that you can put to immediate use.

Customer Reviews

Overall good book with some quirks - Reviewed on 2008-06-19
* * *

The book is robust and goes into alot detail. I liked the comparing and contrasting between the various RegEx implementations. I had a difficult time digesting some of the detail. In particular, the analogies confused me and I felt the author went overboard with them. Many times, I had to backtrack to understand what was being discussed. However, regular expressions is a complex topic and the author did a good job easing into the concepts. An additional plus was with inline page citation - this helped to find the page corresponding to the topic being discussed.
I would have liked shorter chapters with chapter summaries and more diagrams in place of analogies. Ultimately, Mastering Regular Expressions is a good book referencing a complex topic.
Best material I have seen on regular expressions - Reviewed on 2008-06-01
* * * * *

I went through several books and online tutorials and never found anything that did a good comprehensive job of explaining regular expressions. This book does. If you are having trouble "getting it", I highly encourage reading this book. You will be extremely enlightened even after the first few chapters.
Very in-depth - Reviewed on 2008-05-23
* * * *

Quite a comprehensive guide to regular expressions. Gets very detailed in the areas that it covers. However, definitely not a 'beginner's guide'. I highly recommend that you are already comfortable with the basis of regular expressions before picking up this book. You will get way more out of it if this is not your first introduction to it. Comfort and proficiency with Perl would also be a big help. Title is correct though, this is a guide to 'mastering' regular expressions, not learning them from the beginning.
Will take you a long way down the rabbit hole - Reviewed on 2008-02-15
* * *
1 customer found this review helpful.

How deep down the rabbit hole do you really NEED to go? I had a serious need to get on top of regular expressions to solve one particular problem. I looked at several online tutorials which didn't take me where I needed to go, so I ordered Mastering Regular Expressions after reading the Amazon reviews. I always look at the negative reviews first. In spite of the negative reviews I ordered the book with an open mind.
When the book arrived I began reading it with enthusiasm. In the preface there is a small section on "How to Read This Book". I bought into the author's suggestion to read the book's first six chapters first. I was captivated through the first three chapters, and then somewhere in chapter 4 I began to get very weary with information overload. After putting the book down for a couple of days I decided to skip the rest and use what I needed to write the one regular expression I had need of. The book did successfully help me accomplish this, so I gave it 3 stars. Not only did it give me the information I needed that the online tutorials didn't, it also gave me the confidence I needed. For that, which I am grateful, I would have liked to have given it more stars. I think many of those in need of learning about regular expression could be well served by a "lite-edition" of this book. Perhaps someday when I have the time and the need I may try to wade through the rest of the book, but as it is now Mastering Regular Expressions took me far farther down the rabbit hole than I really needed or wanted to go.
If you need to get on top of Regular Expressions, I would recommend this book, however just be ready to be taken far deeper than the average coder probably needs to go.
Incredible book - Reviewed on 2008-02-05
* * * * *

An incredible book. Absolutely incredible. It will take 200 lines of your code and reduce it to 1 or 2 lines. It will open your mind to search and replace possibilities. Your life will change (just kidding). It's a great deep book.

However, I agree with the comment that one should not begin learning regex with this book. it's a little too advanced. Go on the internet, get an introduction. Or else, buy one of the introductory books on the subject first. But definitely get around to buying this book!
Read More Customer Reviews »
Go To Amazon Product Page

* - See Amazon Product Page for shipping and pricing details.


Book Subjects