Sell Back Your Copy
For a $0.42 Gift Card
Trade in
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 your Kindle here, or download a FREE Kindle Reading App.

Mastering Regular Expressions, Second Edition [Paperback]

Jeffrey E.F. Friedl (Author)
4.5 out of 5 stars  See all reviews (144 customer reviews)


Available from these sellers.


Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Paperback $27.38  
Paperback, July 15, 2002 --  
There is a newer edition of this item:
Mastering Regular Expressions Mastering Regular Expressions 4.5 out of 5 stars (144)
$27.38
In Stock.

Book Description

0596002890 978-0596002893 July 15, 2002 Second Edition

Regular expressions are an extremely powerful tool for manipulating text and data. They have spread like wildfire in recent years, now offered as standard features in Perl, Java, VB.NET and C# (and any language using the .NET Framework), PHP, Python, Ruby, Tcl, MySQL, awk, Emacs, and many other popular tools and languages. If you don't use regular expressions 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. In spite their wide availability, flexibility, and unparalleled power, regular expressions are frequently underutilized. Regular expressions allow you to code complex and subtle text processing that you never imagined could be automated. Regular expressions can save you time and aggravation. They can be used to craft elegant solutions to a wide range of problems. A command of regular expressions is an invaluable skill. Yet what is power in the hands of an expert can be fraught with peril for the unwary.

Mastering Regular Expressions will help you navigate the minefield to becoming an expert. Once you've mastered regular expressions, they'll become an invaluable part of your toolkit. You will wonder how you ever got by without them. Mastering Regular Expressions, Second Edition has been thoroughly updated to include all the new features of Perl 5.8, as well as several other languages, including Java, VB.NET, C#, Python, JavaScript, Tcl, and Ruby. Written in the lucid, entertaining tone that made a complex, dry topic crystal-clear to thousands of programmers, and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions offers a wealth information that you can put to immediate use. Topics include:

  • A comparison of features among different versions of many languages and tools
  • How the regular expression engine works
  • Optimization (major savings available here!)
  • Matching just what you want, but not what you don't want
  • Sections and chapters on individual languages

  • Customers Who Bought This Item Also Bought


    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 an alternate Paperback edition.

    Product Details

    • Paperback: 496 pages
    • Publisher: O'Reilly Media; Second Edition 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 (144 customer reviews)
    • Amazon Best Sellers Rank: #360,057 in Books (See Top 100 in Books)

    More About the Author

    Discover books, learn about writers, read author blogs, and more.

     

    Customer Reviews

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

    123 of 132 people found the following review helpful:
    5.0 out of 5 stars I need more stars... Bravo Jeffrey, December 8, 2001
    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.

    Help other customers find the most helpful reviews 
    Was this review helpful to you? Yes No


    38 of 39 people found the following review helpful:
    5.0 out of 5 stars Those wise birds!, May 3, 2001
    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!

    Help other customers find the most helpful reviews 
    Was this review helpful to you? Yes No


    17 of 17 people found the following review helpful:
    5.0 out of 5 stars So good, I bought it twice!, January 5, 2003
    By 
    Bob Nelson (Frisco, TX United States) - See all my reviews
    (REAL NAME)   
    Amazon Verified Purchase(What's this?)
    This review is from: Mastering Regular Expressions, Second Edition (Paperback)
    In spite of the vow that Friedl would not put himself (and his family) through the rigors of writing a followup to his first edition, I sure am glad he made the decision to write a second edition. Over 5 years ago, I got the first such book and found it to be a humbling experience -- realizing just how little I *really* knew about regular expressions (in spite of thinking my skills were quite advanced in that area).

    Now, years later and as an instructor of UNIX at North Lake College in Irving, Texas, I highly recommend this book to even our first year students. Friedl's clear explanation of this topic and the manner in which he presents the material makes it comprehensible to even those that have never had experience with regex's before. Like Perl's Larry Wall, Jeffrey Friedl has a strong background in natural languages. That contributes not only to bhis lucid writing style but also helps in terms of understanding regex's as a "little language".

    This 2nd edition is particularly welcome because of its extensive coverage of regular expressions in the context of Java. That ons aspect alone is sufficient to get the updated second edition (to say nothing of the enhancements in Perl since the first edition of the book).

    Help other customers find the most helpful reviews 
    Was this review helpful to you? Yes No

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











    Only search this product's reviews



    Inside This Book (learn more)
    Browse and search another edition of this book.
    Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
    modifying text, matching text, unicode version, preg functions, regex flavor, regex literal, capturing parentheses, replacement operand, overall regex, original target string, default regex, regex engine, lazy quantifiers, regex object, egrep support, possessive quantifiers, neverending match, matcher object, matcher methods, regex construct, anchoring bounds, discrimination optimization, regular expression features, common metacharacters, zeroth group
    Key Phrases - Capitalized Phrases (CAPs): (learn more)
    Sun's Java, Perl Enhancements, The Preg Functions, The Matcher Object, Efficient Expression, Unrolling the Loop, Ten Thousand, Few Short Examples, The Mechanics of Expression Processing, Character Encodings, Argument Summary, Common Optimizations, Jeffrey Friedl, Perl Efficiency Issues, Extended Examples, Regex-Related Perlisms, Extended Introductory Examples, Henry Spencer, Imports System, The King, Core Object Details, Expanding the Foundation, Practical Regex Techniques, Basic Properties, The Preg Function Interface
    Browse Sample Pages:
    Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
    Search Inside This Book:


    What Other Items Do Customers Buy After Viewing This Item?


    Tags Customers Associate with This Product

     (What's this?)
    Click on a tag to find related items, discussions, and people.
     
    (6)
    (1)
    (1)

    Your tags: Add your first tag
     

    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 Discussions

    This product's forum
    Discussion Replies Latest Post
    No discussions yet

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


    Active discussions in related forums
    Search Customer Discussions
    Search all Amazon discussions
       
    Related forums





    Look for Similar Items by Category


    Look for Similar Items by Subject