BUY THIS BOOK
Add to Cart

Print Book $44.99

Add to Cart

Print+PDF $58.49

Add to Cart

PDF $35.99

Safari Books Online

What is this?

Add to UK Cart

Print Book £31.99

What is this?

Looking to License this content?

Mastering Regular Expressions, Third Edition

By Jeffrey E. F. Friedl
August 2006
Pages: 542
ISBN 10: 0-596-52812-4 | ISBN 13: 9780596528126
starstarstarstarstar (Average of 4 Customer Reviews)

Buy 2 Get 1 Free Free ShippingGuarantee

Book description

Written in the lucid, entertaining tone that makes a complex, dry topic become crystal-clear to programmers, and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions, 3rd Edition, offers a wealth of information that you can put to immediate use.
Full 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, Python, Ruby, Java, VB.NET and C# (and any language using the .NET Framework), PHP, and MySQL.

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.

As this book shows, a command of regular expressions is an invaluable skill. 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. 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.

Yet despite their wide availability, flexibility, and unparalleled power, regular expressions are frequently underutilized. 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 and help you optimize your use of regular expressions.

Mastering Regular Expressions, Third Edition, now includes a full chapter devoted to PHP and its powerful and expressive suite of regular expression functions, in addition to enhanced PHP coverage in the central "core" chapters. Furthermore, this edition has been updated throughout to reflect advances in other languages, including expanded in-depth coverage of Sun's java.util.regex package, which has emerged as the standard Java regex implementation.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

Written in the lucid, entertaining tone that makes a complex, dry topic become crystal-clear to programmers, and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions, Third Edition offers a wealth information that you can put to immediate use.

Reviews of this new edition and the second edition:

"There isn't a better (or more useful) book available on regular expressions."
--Zak Greant, Managing Director, eZ Systems

"A real tour-de-force of a book which not only covers the mechanics of regexes in extraordinary 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

"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, Java Ranch

Browse within this book

Cover | Table of Contents | Index | Sample Chapter




Featured customer reviews

Write a Review


Mastering Regular Expressions, Third Edition,  November 26 2006
Rating: StarStarStarStarStar
Submitted by Frederick J Eccher Jr   [Respond | View]

Mastering Regular Expressions, Third Edition
By Jeffrey E. F. Friedl
Third Edition August 2006
Pages: 542
Series: Adobe Developer Library
ISBN: 0-596-52812-4

Description
Written in the lucid, entertaining tone that makes a complex, dry topic become crystal-clear to programmers, and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions, Third Edition offers a wealth of information that you can put to immediate use.

The description above is quite an understatement. Even the full description does not do this book justice. Mastering Regular Expressions, Third Edition is almost a classic and should be on your bookshelf, chained down. If your programming friends, coworkers, or enemies try to borrow this book, beware. It takes quite a while to get it back, even bent, spindled and mutilated so you might not want it back [yeah that was actually tried]. You might try a rule about using it at your desk, but that did not work for me either.

My experience agreed with almost everything written, except that I do not have the in depth use of RegEx the author clearly has. I wish I was on the same page with him in experience with RegEx. I started with RegEx in college in the early 90s and remember six projects that I had to do that could have been much easier with this book. My programming experience used RegEx on occasion but not with the power explained in this book. I appreciate the detailed and thorough comparisons of the languages. The only word I really missed in the INDEX and Table of Contents was: SECURITY. Using RegEx to make sure security issues are properly handled would really help many programmers and developers.

The topics start with a Preface, then moves to Introduction to Regular Expressions, then Extended Introductory Example, then Overview of Regular Expression Features and Flavors, then The Mechanics of Expression Processing, then the Practical Regex Techniques, then Crafting an Efficient Expression, then Perl, Java, .NET, PHP, and finally the Index. Remember to read the Preface, it is very interesting. The author makes some points about how to read the book [the first six chapters] and how to THINK.

The 10 chapters are written very thoroughly. I like that about this book. Explanations of history and trivia are all over the place but are written like a story and easy to read. The figures are good and useful in the explanation of the concepts. The code is usually more than a few lines. This is a more complicated book and requires more expressive code examples.

The topics are useful and helpful in just about any language, including the more recent powerful languages like .NET and Java.

I thought the discriminations made about the different languages that use Regular Expressions went from general to specific in a hurry. Even so, the book is pretty long and needs to be digested in discrete chunks. No way to read this in one evening. There is no way to digest the concepts and comparisons very fast, at least for me. This is valuable knowledge worth your time to read and digest as thoroughly as possible.

The 540+ pages were easy to read and understand, partly told as a story. I read it in one week. There were a few typos and grammar errors, but not very many. The book is for someone who is a beginner or an expert and needs to know the specific times when one regular expression has even a slight benefit over another. More experienced people should look it over to make sure they are up to speed with this author.

I would give this book 5 out of 5 stars. Definitive!!!!!

Frederick J Eccher Jr
MBA
M.S. Management of Information Systems
A.B. Psychology
B.A. Biology
President, Board of Directors, Saint Louis Visual Basic Users Group
rick@stlvbug.net
November 26, 2006



Good and enjoyed reading it,  November 15 2006
Rating: StarStarStarStarStar
Submitted by Vikramaditya J   [Respond | View]

Regular Expressions is basically the same across most languages (some variations as how you use it and terminology differences too), whether it may be C#, Javascript, PHP, Ruby, Python, TCL, Perl, or JAVA. This is amazing and should be used as an hand book for students and beginning to intermediate developers. As the book is in third edition some basics of the programming languages are expected to be know by its readers. Overall its a good book and worth a reading.




Not a Reference! Everything you ever wanted to know about regex!,  October 20 2006
Rating: StarStarStarStarStar
Submitted by ismism   [Respond | View]

As the author states, this is not a reference. It is everything you might ever want to know about regular expressions and then some. Well written, but a bit too epic for me, and if you aren't interested in perl - as I am not - there is a lot of information you just don't need (or want).

Read all reviews


the title says it all,  September 15 2006
Rating: StarStarStarStarStar
Submitted by Jeanne Boyarsky   [Respond | View]

“Mastering Regular Expressions” takes a great book and modernizes it to include the latest programming languages. The book starts out with assuming you know anything about Regular Expressions – aside from the concept to be interested in picking up the book.



The author introduces regular expressions through examples and quickly introduces the constructs. The second third of the book goes into the details of how regular expressions are processed. This includes correctness and efficiency issues. The final third on the book goes over the syntax in Java, .NET, Perl and PHP. Tools like grep and awk are described in the text as well.



An alternate title for this book would have been “Thinking in Regular Expressions.” Even if you think you know regular expressions, this book teaches you how much more there is to learn. It also teaches you some of the finer points of regular expressions in your favorite programming language along with cross references to the earlier part of the book.



The author uses good analogies to make the text understandable. After awhile, the concepts get so complicated that you have to read it many times to understand. A typically O'Reilly book. I've only had this book two weeks and I've already used it to make me a more effective developer!


Media reviews
"Classics are funny things, especially in the world of books. There are books that people say "should' be classics (I'll refrain from mentioning names to protect the pretentious) and then there are books that people are too busy actually using to get around to listing as classics. Mastering Regular Expressions, now in it's third edition, is in the second group. It's one of those books that you see on desks in computer departments the world over. This is a real "doers" book...Nail it to your desk unless you want to be constantly retrieving it from your co-workers. If I might be permitted a Spinal Tap reference, this one goes to eleven. If you ever use regular expressions, are thinking of using regular expressions or are in the same room as a regular expression, then you need this book. "
-- Simon P. Chappell, Slashdot.org


"In sum, let me just say that any developer who finds the need to manipulate text - whether it be scraping a web page, creating a report, importing data, or a hundred other applications, is going to need Regular Expressions. Jeffrey's book provides a complete and mature approach that is fresh, timely and detailed. I would recommend this book for any developer...Highly recommended!"
-- Peter Bromberg, EggheadCafe.com


"This is an impressive book; it's easily the best book I've encountered on regular expressions."
-- George Woolley, Oakland Perl Mongers



Read all reviews

See larger cover


"Nail it to your desk unless you want to be constantly retrieving it from your co-workers. If I might be permitted a Spinal Tap reference, this one goes to eleven. If you ever use regular expressions, are thinking of using regular expressions or are in the same room as a regular expression, then you need this book."
--Simon P. Chappell, Slashdot.org