- You'll save an extra 5% on Books purchased from Amazon.ca, now through July 29th. No code necessary, discount applied at checkout. Here's how (restrictions apply)
Mastering Regular Expressions Paperback – Aug 18 2006
|New from||Used from|
Special Offers and Product Promotions
Frequently Bought Together
Customers Who Bought This Item Also Bought
No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
Getting the download link through email is temporarily not available. Please check back later.
To get the free app, enter your mobile phone number.
"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
Understand Your Data and Be More ProductiveSee all Product Description
What Other Items Do Customers Buy After Viewing This Item?
Top Customer Reviews
Most Helpful Customer Reviews on Amazon.com (beta)
Further, because this book shares a similar title and cover as the Regex Pocket Reference by O'Reilly Media, I had mistakenly assumed that this book also shared its coverage of Ruby specifics. It does not. If you are a rubinest you'll find scant references to Ruby at all; Tcl gets more attention than Ruby.
On the other hand, if you're into Perl or PHP (I am not, obviously) you'll find a lot of value in this book. Dive right in.
I encourage the author and editors to decouple regex and language-specific implementations in future editions.
Stylistically and structurally, this is one of the most unique O'Reilly publications I have read. The author even says in the early chapters to think of the book as a novel, and not as a reference (the book's structure doesn't really lend itself to being a reference book anyways). The mindset that the author applies to his writing makes a discernable difference in how the book reads, and it feels more like a chronological story and less like a textbook as a result. Even the quizzes that the author scatters throughout the book are treated as part of the "story", and the solutions are on the very next page rather than in the back of the book or at the end of the chapter. As a result, the book is very easy to read, and flows extremely well. It feels much less like a textbook and more like a narrated lesson from an enjoyable professor.
With a topic as muddy and potentially confusing as regex, I was worried that the text would be just as confusing to follow. However, I was pleasantly surprised. The text itself is very well written, and very clear. There was never an instance in which I had trouble comprehending what the author was trying to communicate, and I almost never had to go back and re-read something multiple times to grasp the concept.
Furthermore, the text is full of excellent examples with accompanying explanations. The author almost exclusively teaches through example, and as a result, most of the lessons are extremely practical and great real-world applications. All of the code examples (of which there are many page-long instances of) are very well documented, and easy to understand.
Regex really is one of the most portable utilities that exists in the UNIX world. It can be applied to an enormous number of situations, and is interoperable with a laundry list of other tools and languages. As such, regex is not only a tool, but a general concept that must be grasped prior to proper usage - and this is what the first several chapters focus on. Thinking about problems in terms of regex is something that takes practice, and does not come easily to most people. This book tends to teach through example, and jumps right into matching simple regex to text lines to demonstrate how regex works. This brings me to my next point.
This book is not for beginners. I cannot stress this enough. The chapters not specifically aimed at a language require solid knowledge of a structured language like C++ or Java. Granted, the book really won't appeal to anyone that doesn't use computers on an advanced level on a regular basis; however, what I want to stress is that regardless of the reader's level of computer experience, if the reader does not have advanced knowledge of text handling in serious computer languages, most of the book's content will be too complex.
On the same note, and this is not a bad thing, about half the book is language-specific. There is a chapter for Perl, PHP, and Java. Obviously, if you don't know these languages, then most of the content of these chapters will be useless. This is not to say that the book will be useless to you if you don't know these languages - the non-language specific chapters occupy a large portion of the book, and contain more than enough material to master regex - however, the reader should be aware that just under half the book is aimed at specific languages.
Overall, this book is nothing short of fantastic. The audience for it is very limited - however, the author manages to make a concept difficult to understand, and even harder to master, easy to read about and learn. Clearly, a lot of thought went into the craft and design of this book, and it shows. I would highly recommend this book to any programmer, system administrator, or computer power user.
However, I am pleased to state that whoever the tech reviewers were, they did a thorough job on this one from O'Reilly. This book has matured over these three editions to become what I would consider the most detailed and valuable book about Regex on the planet - and that means whatever your favorite programming language or platform is.
And this book focuses on the mastery of regex, not being a reference tool. Though each language has a different syntax for handling objects and methods, the underlying objects and methods are the same with Regex, so even complex examples shown in one language directly translate to the other languages.
Suffice to say that there are basic concept chapters that are really language - agnostic, and then specific sections on PHP, .NET, JAVA, and Perl. The book covers practical Regex techniques and most importantly, it gets you to the conceptual level where you can begin constructing Regex patterns on your own, without having to look for "examples".
For .NET developers, Jeffrey provides a complete table-based overview of .NET's Regular Expression flavor, with a focus on the new features available in .NET 2.0, including class subtraction, RegexOptions, and named capture.
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.
The third edition just came out -- and that makes 10 years since this book was first published. That statistic alone indicates the steady value of "Mastering Regular Expressions" across the constant changes in applied software technology over that time. Regular expressions, still the most under-used power tool, needs a book like this.
Specifically, this third edition features enhanced coverage of PHP in the early tutorial chapters, plus an all new chapter devoted entirely to PHP regular expressions.
Also new in this edition, the Java chapter has been rewritten and expanded to reflect new features as Java itself has developed.
The good news is that Mastering Regular Expressions contains a very comprehensive overview of the theory of Regular Expressions ("REGEX"). The bad news, one common to many O'Reilly books, is that the book buries useful nuggets of information deep within paragraph after face-numbing paragraph of theory that too often includes tangentially pertinent theory, digressions, and corner cases.
I'm a reasonably technical person who works at a basic level with scripts and programming languages on a regular basis. Needing to do some REGEX find-replacing, I picked up my copy of Mastering Regular Expressions hoping to get a quick overview of the syntax needed to match a known string followed by an unknown variable-length string of alpha characters and terminated by a less-than sign ("<").
Silly me, I thought the section titled "In a Nutshell", or perhaps the one titled "A Few Short Examples", might give me a quick overview of the REGEX I needed. Nope. I immediately found myself sinking into one after another after another wordy description of corner cases, exceptions, and parsing engine theory.
So I went to the Web. And quickly found (without the " quotation marks) ".*<".
If your goal is to immerse yourself in a densely written journey through every possible aspect of REGEX theory, this book is for you. If you're instead just trying to apply a bit of basic REGEX to a specific problem, try a Web search or two (or three) first. You'll almost certainly find what you need a whole lot quicker and less expensively...
Look for similar items by category
- Books > Computers & Technology > Computer Science
- Books > Computers & Technology > Databases > Specific Databases > MySQL & mSQL
- Books > Computers & Technology > Programming > C
- Books > Computers & Technology > Programming > Java
- Books > Computers & Technology > Programming > Languages & Tools > C
- Books > Computers & Technology > Programming > Languages & Tools > C#
- Books > Computers & Technology > Programming > Languages & Tools > Cobol
- Books > Computers & Technology > Programming > Languages & Tools > Fortran
- Books > Computers & Technology > Programming > Languages & Tools > RPG
- Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Object-Oriented Design
- Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Software Development
- Books > Computers & Technology > Software
- Books > Computers & Technology > Web Development > Programming > SQL
- Books > Computers & Technology > Web Development > Programming > XML
- Books > Textbooks > Computer Science & Information Systems > Computer Science
- Books > Textbooks > Computer Science & Information Systems > Object-Oriented Software Design
- Books > Textbooks > Computer Science & Information Systems > Programming Languages
- Books > Textbooks > Computer Science & Information Systems > Software Design & Engineering