Read it online

Read this book online
at the Safari Bookshelf.

Read online - Safari

Envelope Tell a friend

Mastering Regular Expressions, Second Edition

By Jeffrey E. F. Friedl
Second Edition July 2002 
Pages: 484 (More details)
starstarstarstarstar (Average of 5 Customer Reviews)

Price: $39.95 USD, $61.95 CAD, £28.50 GBP
Buy two books, get the third FREE! Use discount code "opc10"
This book qualifies for FREE SHIPPING within the US. See details.
Read our 100% guarantee

Book description

Regular expressions are an extremely powerful tool for manipulating text and data. They are now standard features in a wide range of languages and popular tools, including Perl, Java, VB.NET and C# (and any language using the .NET Framework), PHP, Python, Ruby, Tcl, MySQL, awk, and Emacs. 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.
Full Description

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
Post-purchase benefits:

Register your book | View/Submit Errata | View/Submit Review | Author's Web site


Browse within this book

Cover | Table of Contents | Index | Sample Chapters | Colophon


No time right now?   Email This Page Email these links Customers who bought this book also bought:
sed & awk
Read more
Regular Expression Pocket Reference
Read more
Perl Cookbook
Read more
Classic Shell Scripting
Hidden Commands that Unlock the Power of Unix
Read more
Learning the bash Shell
Read more

No time right now?   Email This Page Email these links Customers interested in this book may also be interested in:
Conference:
O'Reilly Open Source Convention
July 23-27, 2007
Portland, Oregon
Read more
Course:
Learn Perl for CGI Programming
Read more
Course:
Linux/Unix Sysadmin IV
Scripting for Administrators - Sed, Awk, and Perl
Read more
Article:
What's New with Regular Expressions
Read more
Article:
Marshall McLuhan vs. Marshalling Regular Expressions
Read more

Book details

Title: Mastering Regular Expressions
Second Edition: July 2002
ISBN: 0-596-00289-0
Pages: 484
Average Customer Reviews: starstarstarstarstar (Based on 5 Reviews)


Featured customer reviews

Write a Review

Superb book   Rating: StarStarStarStarStar
2005-11-18 09:04:26  Anonymous Reader [Reply | View]
If you use regular expressions, you'll love this book.

If you don't use regular expressions, this book will open your eyes to a much faster and cleaner way of doing a lot of what you probably struggle with every day.

Not only have I read it through, cover-to-cover, twice - I have permanent bookmarks in the book so I can find the parts I use all the time (the Perl section is particularly useful). Reading this book (and it's companion pocket reference) has saved me literally hours of time on some jobs, and made others possible. Some co-workers made fun of how much I read it - until they needed to understand a regular expression in someone else's code. Now they think it's wonderful.

Some of the best parts include details on the differences between Perl, grep, vi, Java, etc. Very well done. The examples are superb, and the occasional "quiz" lets you make sure you're really understanding what he's talking about. The author also includes references to other pages (instead of making you remember where you saw something

From zero to complete in one day!   Rating: StarStarStarStarStar
2004-07-10 21:34:20  Christopher Nurse [Reply | View]
This book has transformed the way I plan to write applications. Whereas before I would have had major areas of hardcoded logic, I can now write scripts that can be parsed using regex stuff I have learned from this book.

This makes my applications "soft", it opens up major areas of functionality that can become user customisable, where the customisations can be validated, to bullet proof the application against syntax errors.

In short, think regex, as the author says, open your mind and a whole heap of new possibilities will be yours!

Amazing   Rating: StarStarStarStarStar
2004-06-28 05:51:58  lucas_gonze [Reply | View]
Friedl's obsessiveness is mind blowing, and the result is a remarkable book. He took the trouble to invent new typographic conventions. He constructed, somehow, a compelling narrative flow and informal voice in a book on a very dry topic. The examples illustrate perfectly. The history of regular expressions is comprehensive. Etcetera ad superlativim.

On a practical level I found this book had an impact on my working life. It's useful. But leaving aside the value of advanced regular expressions or of this book in helping you to master them, it is an absurdly well made guide, definitive not just on the topic but also on as an example of technical writing.

Read all reviews

Mastering Regular Expressions, 2nd Edition Review   Rating: StarStarStarStarStar
2004-02-06 08:51:45  George Woolley of Oakland.pm [Reply | View]


If regular expressions are important to you, get this book.

"Mastering Regular Expressions" is exceptional

both in the scope of what it covers regarding regular expressions

and also in it's thoroughness.

To date this is the most impressive technical book I've read on any subject.

It's a virtuoso performance.

One caveat: parts of the book are quite demanding.

See my longer review for more detail.

Mastering Regular Expressions, 2nd Edition Review   Rating: StarStarStarStarStar
2002-10-13 18:28:33  Larry Bezeau [Reply | View]
The second edition of Mastering Regular Expressions is

undoubtedly the most thorough and unified coverage of this important

topic. A treatise such as this is appropriate in light of the large

number of programs, both interactive and command line, that use regular

expressions with feature sets that vary from program to program. Many

references on specific languages contain chapters on the use of regular

expressions within the language, but they lack the unifying thrust of

this book. Friedl's book also considers the issue of efficiency in the

use of regular expressions, a topic not normally examined elsewhere.

The book covers regular expressions in general followed by specific

coverage of regular expressions in three languages, Perl, Java, and .net.

A major omission here in my view is JavaScript. The newer versions of

JavaScript have a powerful regular expression capability and, unlike the

other languages considered, JavaScript occurs in a context where there is

no other choice of language, in interactive pages in web browsers. Another

language that gets short-changed is TCL (Tool Command Language) which has

a very powerful and efficient regular expression capability. My own

perference would have been for coverage of these two languages over the

the three chosen by the author.

There is a chapter on solving practical problems but I would have preferred even more on this topic. Little mention is made of utilities

such as sed that depend entirely on regular expressions for their usefulness.

To the author's credit, he does document carefully many of the traps into

which regular expression programmers frequently fall.

Many consider regular expressions to be inelegant but they are

much more concise than the alternatives and are often used where there

is no other reasonable choice. If you find yourself in this situation,

and especially if you are using regular expressions in more than one

language or utility, you will benefit from reading this book. It is

well organized and readable.

Larry Bezeau

University of New Brunswick


Media reviews

"A real tour-de-force of a book which not only covers the mechanics of regexes in extroadiary detail but also talks about efficiency and the use of regexes in Perl, Java, and .NET. . .If you use regular expressions as part of your professional work (even if you already have a good book on whatever language you're programming in) I would strongly recommend this book to you."
--Dr. Chris Brown, "Linux Format," November 2003

"The author does an outstanding job leading the reader from regex novice to master. The book is extremely easy to read and chock full of useful and relevant examples...Regular expressions are valuable tools that every developer should have in their toolbox. 'Mastering Regular Expressions' is the definitive guide to the subject, and an outstanding resource that belongs on every programmer's bookshelf. Ten out of Ten Horseshoes."
--Jason Menard, javaranch.com, March 2003

"An excellent guide to using regular expressions, not only for .Net, but also in Java and Perl...this a valuable book for anyone who needs to master regular expressions."
--Huw Collingbourne, PC Plus, March 2003

Read all reviews


See larger cover
Browse within this book