See buying choices for this item to see if it's one of the millions that are eligible for Amazon Prime.

28 used & new from $5.00

Have one to sell? Sell yours here
 
 
Mastering Regular Expressions, Second Edition
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get yours here.
 
  

Mastering Regular Expressions, Second Edition [ILLUSTRATED] (Paperback)

by Jeffrey Friedl (Author)
Key Phrases: modifying text, matching text, unicode version, Sun's Java, Perl Enhancements, The Preg Functions (more...)
4.5 out of 5 stars See all reviews (132 customer reviews)


Available from these sellers.


10 new from $6.22 18 used from $5.00
Also Available in: List Price: Our Price: Other Offers:
Paperback (3) $44.99 $29.69 65 used & new from $16.49
There is a newer edition of this item:
Mastering Regular Expressions Mastering Regular Expressions 4.5 out of 5 stars (132)
$29.69
In Stock.
What Do Customers Ultimately Buy After Viewing This Item?

Customers Who Bought This Item Also Bought

Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET (Pocket Reference (O'Reilly))

Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET (Pocket Reference (O'Reilly))

by Tony Stubblebine
4.2 out of 5 stars (27)  $10.19
sed & awk (2nd Edition)

sed & awk (2nd Edition)

by Dale Dougherty
4.3 out of 5 stars (40)  $23.07
Learning Perl, 5th Edition

Learning Perl, 5th Edition

by Randal Schwartz
4.2 out of 5 stars (296)  $26.39
Classic Shell Scripting

Classic Shell Scripting

by Arnold Robbins
4.6 out of 5 stars (10)  $23.07
Programming Perl (3rd Edition)

Programming Perl (3rd Edition)

by Larry Wall
4.0 out of 5 stars (111)  $32.97
Explore similar items

Editorial Reviews

Amazon.com Review
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. --This text refers to an out of print or unavailable edition of this title.

Review
"Indispensable for text processing wizards and regex newcomers alike." - Paul Hudson, Linux Format, February 2007 "In addition to the sheer volume of information, one thing that sets this book apart is that the author uses "real-world" rather than contrived examples. A few of the examples were situations that I have yet to come across, but many were either "been there, done that" or things that I had to go out and try." - James Mohr, Linux Magazine, April 2007 --This text refers to the Paperback edition.

See all Editorial Reviews

Product Details

  • Paperback: 496 pages
  • Publisher: O'Reilly Media, Inc.; 2 edition (July 15, 2002)
  • Language: English
  • ISBN-10: 0596002890
  • ISBN-13: 978-0596002893
  • Product Dimensions: 9.2 x 7 x 1.2 inches
  • Shipping Weight: 1.7 pounds
  • Average Customer Review: 4.5 out of 5 stars See all reviews (132 customer reviews)
  • Amazon.com Sales Rank: #403,826 in Books (See Bestsellers in Books)

Inside This Book (learn more)
Browse and search another edition of this book.


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.
(5)
(1)
(1)

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
No one has tagged this product for Amazon search yet. Why not be the first to suggest a search for which it should appear?

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

132 Reviews
5 star:
 (90)
4 star:
 (24)
3 star:
 (10)
2 star:
 (6)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
4.5 out of 5 stars (132 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
103 of 111 people found the following review helpful:
5.0 out of 5 stars I need more stars... Bravo Jeffrey, December 8, 2001
By "sherzodr" (East Lansing, MI USA) - See all my reviews
Jeffrey Friedl's "Matering Regular Expressions" does a facinating job in taking you through the jungle (and I mean jungle) of RegExp.

I am a Perl/CGI programmer, and I had considered myself good at RegExp even before I read this book. Most of the things I knew were from Programming Perl, 3rd edition (chapter 5, Pattern Matching). But I still decided to give Jeffrey a chance since I was having some trouble with my Parse::Syntax module, which is designed to parsing *any* programming language and highlighting the syntax accordingly (provided it has a syntax/grammer file written for the specific language). The accuracy of the parser (and more importantly the speed) does depend on well crafted regular expressions.

As I started reading the book, I couldn't stop. I took it to my school's cafeteria with me and no one could make me leave untill I finished the whole book. I was excited. I was pleased! Here is the outline of tha chapters:

Chapter 1 and 2 introduce you to regular expressions and give some basic regex examples. Mail utility and date matching is two of them.

Chapter 3 mostly talks about conventions that all the regex tools follow and their differences.

Chapter 4 deals with Traditional NFA, POSIX NFA and DFA regex engines and their pros and cons. What you'll like the most is the details provided by the author on each and every single example. He also uses a lot of step-by-step illustrations to take you deeper into the regex engine itself and see/feel how it works. He shows the point of backtrackings and provides awesome benchmarks. He uses such examples of matching a quote, allowing escaped quotes inside the pattern, matching C-style comments, IP addresses and many more.

Chapter 5 deals with writing efficient regular expressions for NFA engines. It also re-vists some of the examples provided in the previous chapter and fine-tunes them.

Chapter 6 and 7 deals with Tool-Language specific features of Regex engines. Chapter 6 is dedicated to Awk, Tcl and GNU Emacs, whereas chapter 7 is entirely dedicated to Perl, good over 100 pages of Perlism.

It's true that there're features that Perl 5.6 offers when it comes to regex that didn't exist at the time this book went to press, (lookbehinds, for example). But this no way makes this book dated. Just take my word for it. Jeffrey put together a great masterpiece that will not die for many years, no matter how fast the technology tends to enhance
Haven't read anything more exciting than this for many years.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
30 of 30 people found the following review helpful:
5.0 out of 5 stars Those wise birds!, May 3, 2001
By Alfred Anzlovar (Ljubljana Slovenia) - See all my reviews
I got Mastering Regular Expressions in 1998 and I peek back regularly and it am proud to say is one of most used and useful books I own.

Regular expressions are for everyone. They are simple to write and can be close to impossible to read and even unimaginably harder to understand. But reading comes after you can craft one.

And this art of crafting RE is explained in astonishing detail and analysis in this book. Reader is carefully guided through basics, differences and common and uncommon pitfalls. Some of the parts are definitely not for the faint hearted! And this is especially true for parts that cover Perl RE. While main topic is Perl RE engine, a deep-enough travel through different RE dialects is made to help RE-crafting in almost any tool that supports REs.

I've used the methods described in the book in tools as different as MS VC++, various editors, search engines and programming (Perl, PHP, C++, ...). The ability to use RE usually impressed people to the point they were sure I am using some incredible magic.

But I must say that the most useful feature delivered in this book was ability to PARSE, UNDERSTAND and FIX a (slow, broken, strange acting) RE. This can be slowly absorbed by reader's (open) mind while carefully reading the book. The difference between meant/written can be as extreme as it can get in RE. I can (proudly) say I've been able to fix several complex REs, by simply (one could say blindly) following the rules laid in the book.

My opinion is thath without this book real understanding of RE is almost impossible. I recommended it all of those who use programs that support (any form) of RE engine. It will help them solve some (hard) problems incredibly fast!

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
29 of 31 people found the following review helpful:
5.0 out of 5 stars Simply Outstanding, September 26, 2002
I bought this book on a whim, mainly because I try to buy (and read... ugh!) a hard-core technical book every month or so, but mainly because my UNIX scripting abilities have become rusty with disuse. I used to be able to write a tight, 10-line csh script to mangledit thousands of files at a single time. Now I hack away at files manually with vi. The other day, I even forgot how to search & replace. My kung fu isn't nearly what it used to be.

It usually takes me about a month to slog through a new book (especially academic texts, which are great but make you want to have a stiff martini before each new chapter) but I tore through Friedl's book in a few days. It's an outstanding reference for understanding & learning to use regular expressions.

Regexes can be cryptic to say the least, but Friedl offers many examples, broken down into step-by-step instructions and explanations of how each regex works (in many cases, right down to the individual character level). He covers a variety of platforms and languages - the hardcore Perl enthusiast will enjoy this book greatly, but he offers fairly equal time to alternative languages like Java and the "grep" family.

All that said, this book is an outstanding technical reference, pure and simple, for two reasons:

- Friedl uses an interesting new typesetting convention to illustrate which sections of text are regular expressions, and which sections are not. It's hard to describe (and impossible to reproduce here) but they look like 90-degree braces at the upper-left and lower-right corners. This is a FANTASTIC approach and I for one would love to see this extended to other technical books.

- Speaking of other things I would love to see extended to other technical books, THIS BOOK HAS ALMOST NO ERRORS! This is even more impressive considering the fact that, with regular expressions, screwing up EVEN A SINGLE CHARACTER is significant. Nothing [upsets]memore than spending $50-100 perfectly good dollars on a sloppy, error-laden, grammatically-challenged, poorly-edited, ill-reviewed and badly-structured book (which pretty much describes 90% of all the technical books out there). He made a few mistakes, the vast majority of which are extremely trivial in nature, and all of which were quickly posted to his website as errata. If only the other 90% of the technical authors out there were even half as diligent.

All told, this book belongs on your bookshelf.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
Ad
 
Most Recent Customer Reviews

4.0 out of 5 stars take the fear out of regex
Very useful book, the first 6 chapters are general introduction to the tips and tricks of creating and using regexes which applies to all flavors and versions of regular... Read more
Published 1 month ago by sg

4.0 out of 5 stars \bGreat\sB(o)\1k\b
This is the standard textbook on Regular Expressions and for good reason. The third edition however covers the different shades of RegEx from many programming perspectives... Read more
Published 2 months ago by John Grove

4.0 out of 5 stars This book is about 'Mastery,' not 'solving your problem right away'.
Indispensable.

Friedl's 'Regular Expressions' is in-depth and thorough. It has provided me with the framework to become proficient in crafting efficient Regular... Read more
Published 2 months ago by James M. O'Connell

5.0 out of 5 stars Good Book
As with any review of a technical book, an understanding of the reviewer's previous experience with the topic is necessary. Read more
Published 3 months ago by Andrei Mouravski

5.0 out of 5 stars Excellent Book
If you have decided to achieve the thorough knowledge of regular expressions, your search ends here. Get this book and read it. Read more
Published 3 months ago by Mohammad Kazemi

5.0 out of 5 stars Now I really know regular expressions!
Simply put, this is the most useful book I have ever read in my 28 years as an engineer and computer programmer. Highly recommended.
Published 5 months ago by ridgerunner

5.0 out of 5 stars The Only Book You Will Need
This book is fantastic. Given the complex nature of regular expressions, the author explains the material in an easy-to-understand and clear manner. Read more
Published 7 months ago by how-to fanatic

3.0 out of 5 stars Very good book
Das ist sehr gutes Buch und hilft mir zu verstehen, die grundlegenden "regulären Ausdrücken", dass man versuchen mit vielen verschiedenen Sprache Paradigma.
Published 8 months ago by S. Patil

5.0 out of 5 stars Great book, but little Ruby
This book is great if you want to learn about what you can do with regex, how they work, how you can improve them (efficiency & accuracy) and what kind of pitfalls there are... Read more
Published 10 months ago by Patrick Huizinga

3.0 out of 5 stars Overall good book with some quirks
The book is robust and goes into alot detail. I liked the comparing and contrasting between the various RegEx implementations. Read more
Published 13 months ago by E. West

Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (0 discussions)
  Discussion Replies Latest Post
  No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
  [Cancel]


Active discussions in related forums
   


Product Information from the Amapedia Community

Beta (What's this?)



Look for Similar Items by Category

Ad

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.



Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers
Free
Free by Chris Anderson
Paranoia
Paranoia by Joseph Finder
The Adventures of Sherlock Holmes
The Adventures of Sherlock Holmes by Arthur Conan, Sir, 1859-1930 Doyle
Glenn Beck's Common Sense

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates