- Paperback: 544 pages
- Publisher: O'Reilly Media; 3 edition (August 18, 2006)
- Language: English
- ISBN-10: 0596528124
- ISBN-13: 978-0596528126
- Product Dimensions: 7 x 1.3 x 9.2 inches
- Shipping Weight: 1.7 pounds (View shipping rates and policies)
- Average Customer Review: 105 customer reviews
- Amazon Best Sellers Rank: #78,603 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Mastering Regular Expressions 3rd Edition
Use the Amazon App to scan ISBNs and compare prices.
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who bought this item also bought
Customers who viewed this item also viewed
"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
About the Author
Jeffrey Friedl was raised in the countryside of Rootstown, Ohio, and had aspirations of being an astronomer until one day he noticed a TRS-80 Model I sitting unused in the corner of the chem lab (bristling with a full 16K of RAM, no less). He eventually began using Unix (and regular expressions) in 1980, and earned degrees in Computer Science from Kent (BS) and the University of New Hampshire (MS). He did kernel development for Omron Corporation in Kyoto, Japan for eight years before moving in 1997 to Silicon Valley to apply his regular-expression know-how to financial news and data for a little-known company called "Yahoo!"
When faced with the daunting task of filling his copious free time, Jeffrey enjoys playing Ultimate Frisbee and basketball with friends at Yahoo!, programming his house, and feeding the squirrels and jays in his back yard. He also enjoys spending time with his wife Fumie, and preparing for the Fall 2002 release of their first "software project" together.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
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.
When the book arrived I began reading it with enthusiasm. In the preface there is a small section on "How to Read This Book". I bought into the author's suggestion to read the book's first six chapters first. I was captivated through the first three chapters, and then somewhere in chapter 4 I began to get very weary with information overload. After putting the book down for a couple of days I decided to skip the rest and use what I needed to write the one regular expression I had need of. The book did successfully help me accomplish this, so I gave it 3 stars. Not only did it give me the information I needed that the online tutorials didn't, it also gave me the confidence I needed. For that, which I am grateful, I would have liked to have given it more stars. I think many of those in need of learning about regular expression could be well served by a "lite-edition" of this book. Perhaps someday when I have the time and the need I may try to wade through the rest of the book, but as it is now Mastering Regular Expressions took me far farther down the rabbit hole than I really needed or wanted to go.
If you need to get on top of Regular Expressions, I would recommend this book, however just be ready to be taken far deeper than the average coder probably needs to go.
I had very little experience with regular expressions prior to reading this book. Essentially, when I needed one, I just Googled it and then copied and pasted what I needed, and maybe making a few slight modifications to suit whatever need I had. Now that I have read this book, I can say that I not only know how to develop a regular expression, but I know why that expression works (or not). In fact, while reading the first couple of chapters, I was writing a program that needed to identify a certain pattern of text across 66 text files that ranged from less than 20 to over 2600 lines of text. With just the first two chapters alone, I was able to develop a regular expression that matched the pattern I needed and what would have taken days of parsing the files myself, took only minutes to complete. Already, this book had more than paid for itself (that is, if I had paid for it).
Since I keep coming across programming and web development problems that can only be solved with regular expressions, I needed a resource that would teach me a thing or two about them and allow me to figure them out on my own without having to do the Google-copy-paste routine. After researching this book a bit and seeing overall positive reviews for it, I decided to give it a try.
This book can be broken down into two major parts: 1) Everything you need to know about regular expressions and then some, and, 2) How some languages handle regular expressions. The first part is a bit long and at times not an easy read (the author admits this). The second part is language-specific and good for seeing regular expressions at work in the few example languages, which include, Perl, Java, .NET, and PHP. Now, I'll craft my review around this first part of the book, since it is the meat and bone of this book.
Immediately in the first chapter, you will learn a lot about regular expressions. This is definitely one of those hit-the-ground-running moments. The same goes for chapters 2 and 3. These three chapters are packed full of everything you need to develop a regular expression and have a very good idea of why that regular expression works. I really enjoyed reading these first three chapters, and I think I learned the most from them. Plus, the author's writing style is very easy to follow and very clear. He even works in subtle humor to help lighten the mood, since regular expressions really aren't that exciting of a subject. If all you want is to just make regular expressions, then these chapters are the perfect resource.
Then, you get to chapters 4 through 6. These chapters focus heavily on the why and how of regular expressions. The author admits that these chapters are not a light read. I agree. These chapters were a much slower read for me. You will learn more than you ever thought you needed to know about regular expressions here. You won't learn much about the process of building regular expressions, but you will learn how to build them better and more efficiently. Again, not a light read, but definitely interesting. This is also another area where the author's writing style kept me interested and engaged in reading. If it weren't for his writing style, I probably would have lost interest.
It's clear that this book is a mature work. What I mean is that this book has been around for quite some time and has had years of opportunity to have all of the kinks worked out. In fact, I can count on one hand the number of typos I noticed when reading this book. Furthermore, the typos were so minor that their impact on my reading was only superficial. Now, given that this book has been around a while, it does have one drawback that I repeatedly came across. Throughout the first few chapters, the author uses HTML in the examples. The HTML is quite dated. It's not a big problem and it doesn't take from the reading experience, but that is one thing I think should be updated.
One thing to note here is that you should have at least an introductory-level understanding of programming or web development. The author uses Perl almost exclusively throughout the book for his regular expression examples and having just a basic understanding of how programming works will help you better understand what's going on around the regular expression. Now, the author doesn't just force Perl on you. He does take some time to give you a very basic introduction to Perl so that you don't feel like you're reading a foreign language. Again, a basic understanding of programming will make things a bit clearer and easier to follow.
Overall, I am more than pleased with this book. I think it is well worth the purchase. If you have a recurring need to use regular expressions, whether it be in programming projects, web development, or even just working with loads of text on your file system, then this is the book for you. It's not only a great reference, but it will also help you to understand why regular expressions work the way they do.
NOTE: As mentioned in the first paragraph, I received this book through the O'Reilly Reader Review Program.
Most recent customer reviews
My only complaint is the fonts. Both the text of the book and the source code.Read more
The book is easy to understand and you can apply it immediately.Read more
But there isn't, so we do.