Goodreads helps you keep track of books you want to read.
Start by marking “Mastering Regular Expressions” as Want to Read:
Mastering Regular Expressions
Enlarge cover
Rate this book
Clear rating
Open Preview

Mastering Regular Expressions

4.14  ·  Rating details ·  1,772 Ratings  ·  58 Reviews
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 Express ...more
Paperback, Third Edition, 542 pages
Published August 18th 2006 by O′Reilly (first published January 8th 1997)
More Details... edit details

Friend Reviews

To see what your friends thought of this book, please sign up.

Reader Q&A

To ask other readers questions about Mastering Regular Expressions, please sign up.

Be the first to ask a question about Mastering Regular Expressions

Community Reviews

(showing 1-30)
Rating details
Sort: Default
Igor Tsinman
May 22, 2011 rated it really liked it
Mastering Regular Expressions by Jeffrey E.F. Friedl это замечательная книга/учебник. Всем программистам иметь/читать обязательно. UNIX/Linux программистам я рекомендую прочитать эту книгу раз десять (т.е. выучить наизусть).

Без навыков написания regex очень сложно (практически невозможно) использовать sed, awk, shell, perl, python, etc. А без этого работать на UNIX системах не получится (исключение из этого правило это Java-Java программеры, которым в принципе все равно на какой системе работат
Aug 03, 2017 rated it it was amazing
Shelves: ebook
Mwah, mwah! Thank you, Jeff Friedl, for finally - FINALLY - demystifying this most crucial of meta-programming skills: regular expressions. I had tried online tutorials, videos, even a retro bash game, this and that. Nothing ever helped. This did. FINALLY. FINALLY!

So I didn't "read" the whole book, but whatever, the second half is reference material for languages I never use nor plan to use (Perl, PHP, etc.). Honestly, the first 2-3 chapters were sufficient; once he got into the guts of differen
Jesse Houwing
Nov 09, 2013 rated it really liked it
Shelves: work
If you ever need to dive deeply into regular expressions, then this is the book to read. It doesn't just cover syntax, but dived deeply into state machines, optimizations and the way the engine's are generally implemented.

This book, however, doesn't tell you how to use each different dialect of Regex out there and some of the things the book explains might not be true for your regex engine of choice. I've used it a lot in conjunction with the Regular Expression Pocket Reference: Regular Expressi
Abhishek Kumar
Jul 24, 2017 rated it it was amazing
Giving this book a perfect rating because this enables you to think in terms of building a correct and efficient regular expression and does that with a great correctness and efficiency. Had a doubt in a section of book, emailed author and he replied promptly! It discussed in great deal the mechanism of the engine and which helps to think in terms of regular expression.
Joe Devon
Nov 12, 2017 rated it it was amazing
If you're a programmer of any kind you should know regular expressions. And if you want to learn regular expressions, this is the bible. That's all there is to it.
Rick Strong
Jul 29, 2015 rated it it was amazing  ·  review of another edition
I'm currently reading this book, not done yet, but I'll rate it 5 stars anyway for its usefulness. Regex, which provides a formal way to express text search patterns, is one of the things I always promised to learn properly, since the need for it - finding and replacing text - pops up so often in software development. In my current assignment I've had to use it on a VERY regular basis, and this prompted me to sit down with this volume and go through it front to back.

The first part of the book d
Oct 30, 2007 rated it really liked it
Shelves: development
In writing code, regular expressions are used to find patterns in text. This book explains what they are and how to use them effectively. Chances are you will find out more than you ever wanted to know about them, and quite possibly more than can be immediately assimilated. The author stays focused on regular expressions; all his extensive examples are regex-specific, there is no time wasted on introducing language basics that the reader could easily find elsewhere. The transition from easy exam ...more
Jun 29, 2009 rated it really liked it
I am reading "Mastering Regular Expressions" by Jeffrey Friedl, and am really enjoying it. Not only is it a topic that I find very interesting, but Jeffrey does a great job of leading you (and challenging you) on a path of discovering the power of regex. The narrative is sometimes a bit too self-conscious (the author never lets you forget that it's HIM doing the talking), but that can be forgiven because the book is well written and interesting.

I don't read a lot of technical, "geeky" books, so
Jun 13, 2008 rated it liked it
Shelves: programming
I read the first edition many years ago and while I don't remember the contents in detail, I get the impression that this edition has a much smoother opening than its predecessor, and is thus an easier book to read for less experienced programmers. The first few chapters teach the core techniques, with could recaps and summaries, as well as a lot of useful examples.

The second half of the book is much more advanced and focuses more on the technical aspects of regex engines, ways of maximizing ef
Jan 31, 2013 rated it it was amazing
This was my first book on Regular Expression, so I won't be saying that it is the best or most thorough (no real frame of reference), like some other reviewers do. However, I love the style, the layout, the amount of detail, ... everything about this book. I tend to read a few books on a subject I am researching, because I feel like certain things were not covered or were covered poorly. I will not be picking up another book on RegEx. I will certainly revisit this book from time to time.

I canno
Sep 06, 2015 rated it it was amazing  ·  review of another edition
Книга помогает лучше понять как правильно составлять регулярные выражения, понимать какие данные поддаются анализу регулярными выражениями, а какие - нет. Она должна стать настольной книгой разработчиков, которые часто анализируют данные и хотят это делать качественно и быстро (автор обращает внимание не только на составление регулярных выражений, но и на их оптимизацию).
Очень хорошая книга, рекомендую к прочтению, но будьте осторожны - после прочтения хочется все обработать регулярными выражени
Puneet Singh
Jan 29, 2016 rated it really liked it
Shelves: will-read-again
It gives you a in-depth insight about regular expressions and how to optimize them. It manage to show that how regular expression work for different types of expression engine and languages. To understand the regular expression properly some chapters of it needed to read more than once. This book is lacking a 5 star from my side because the version of book is very old and there are some obsolete examples in few places.
Nov 02, 2012 rated it really liked it
This is not a book *only* about RE but also about the differences in how the main RE engines work. It's written in a slow peace that allows for an easy reading without passing from beginner to absolute complexity.
And don't be frightned by the number of pages since the last 200 or so are about particularities in 4 differente languages that you, as me, may not read until really needed.

That being said, is a great book to get a deep insight in RE.
Jon Gauthier
Feb 26, 2012 rated it really liked it
Shelves: programming
I've been writing regexes for years, but this book still offered new information on the in-depth workings of regex engines and how to optimize expressions by taking advantage of the engine's strong areas.

If you think you already have a good understanding of regular expressions, you can safely skip to chapter 4. The author includes cross references everywhere, so you can still catch up on some minor detail you may have missed.
Sep 18, 2007 rated it it was amazing
Recommends it for: geeks
Heh, heh. I said "Mastering"

Regular Expressions (or RegEx) are a powerful way to recognize and define complex patterns in strings.

My 4-year-old daughter is learning math, and they're starting by teaching her to recognize patterns.

All of research is merely the recognition of patters in data.

This is a really, really important, fundamental, atomic concept. One that I have yet to say I've "Mastered". Heh.
Aaron M
Aug 16, 2007 rated it really liked it  ·  review of another edition
The thing about this book is that it one of those rare texts that can be read cover to cover or used as a reference. This is what we can only wish a textbook would be like.

The book is intense. For practical purposes, you should at the very least read the section covering the basics. That will give you an understanding that will cover 90% of what you might need to do in the real world. After that you can use it to look up issues as they come.
Mar 27, 2009 rated it it was amazing
I thought I was pretty good at regular expressions, but this book puts me to shame. It also makes me glad that I don't have to worry about optimizing them or using them for anything besides quick REPL-type things. Fantastic for anyone who does need a deeper knowledge of regexen. Still quite good for people at my level, where more technical knowledge is helpful, even if it isn't necessary.
Oct 15, 2011 rated it really liked it
Shelves: reference-books
Before O'Reilly started trying to be hip and cool and coining terms like "Web 2.0", they used to write books that didn't suck. This is one of them.

Think you know regular expressions? This book isn't a simple introduction that fades out somewhere near character classes. It's called "Mastering Regular Expressions", and that indeed is it's intent.
Feb 03, 2012 rated it really liked it
I didn't read the book right through, as certain content was not applicable to my knowledge at this point in time, but I found the writing style, information level provided and detail of explaination to be fantastic from this book. Really happy to have found it, currently got this in eBook format but likely to buy it paper format for my desk.
Manny Tingplants
Oct 14, 2014 rated it it was amazing
Shelves: compsci
An entirely higher scope of explanation of regular expressions than any snippet you'll find in the manual or help docs for any particular programming language. J. Friedl is clear, as concise as possible given the subject matter, and a witty pleasure to read. If you have text that needs processing, this is your book.
Aug 28, 2014 rated it it was amazing
Shelves: programming
Фантастическая книга. Начинается как методичное, но совсем не скучное, разжевывание самых основ. А затем все глубже и глубже. Практически идеальный пример учебника. Фридл концентрируется только на самом важном, и делает весь сложную тему доступной.
Doug Alcorn
Jun 26, 2014 rated it really liked it
Back when I read this book it was truly fantastic. No one else had ever dove as deeply into regular expressions. I don't think anyone has since either. However, regexps play a less crucial role than they used to. I still think the book is worth reading if only to get over your fear of regexps.
Aug 31, 2008 rated it it was amazing  ·  review of another edition
Reading this was fantastically useful, I finished just recently but the new knowledge has already earned its keep. It's like taking an intro class on the history and implementation of regex engines from an excellent professor, sans homework and exams.
Michael Jinks
Jan 03, 2016 rated it it was amazing  ·  review of another edition
Shelves: reference, technical
Essential reading, or at least perusing, for any programmer or sysadmin of any language or platform. Regular expressions are one of the most important means we have for communicating with our digital tools, and this is the best introduction and reference I've been able to find.
Sep 16, 2014 rated it really liked it
Shelves: computer-books
This provides a comprehensive guide to regular expressions, which is potentially quite a dull topic, in a interesting and very readable manner.
Richard Foley
Aug 10, 2016 rated it it was amazing
Awesome book. Provides a solid grounding for all regular expression handling. A must-read for any programmer of any generation.
Sep 23, 2009 rated it it was amazing
If you want to meaningfully grok regex, this is probably a good reference. Not your casual beach reading material, to be sure.
j monty
Apr 13, 2007 rated it really liked it
While I believe the author to be a bit of a show-off, the book is good stuff. Required for anyone serious about Regular Expressions.
Trey Piepmeier
This book is dense. In a good way.
M Sheik Uduman Ali
Feb 27, 2012 rated it it was amazing
Pleasure learning about Regular Expressions, though I know the concept well.
Must read book for all IT students and developers
« previous 1 3 4 5 6 7 8 9 next »
topics  posts  views  last activity   
Like this book? Join the O'Reilly Media Fan Page 1 11 Oct 28, 2009 09:23AM  
  • Programming Perl
  • sed & awk
  • Learning Perl
  • Learning the vi and Vim Editors
  • UNIX Power Tools
  • Learning the bash Shell
  • Programming Python
  • JavaScript: The Definitive Guide
  • Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET
  • Perl Best Practices
  • The Protocols (TCP/IP Illustrated, Volume 1)
  • Learning XML
  • Programming Pearls
  • Advanced Perl Programming (Perl Series)
  • The UNIX Programming Environment
  • Regular Expressions Cookbook
  • HTML & XHTML: The Definitive Guide
  • C: A Reference Manual

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »
Jeffrey worked for Omron Tateishi Denki (1989-1997) and Yahoo! Finance (1997-2005), but now lives in Kyoto, Japan with his family.
More about Jeffrey E.F. Friedl
“Just as there is a difference between playing a musical piece well and making music, there is a difference between knowing about regular expressions and really understanding them.” 0 likes
“When it comes down to it, regular expressions are not difŒcult. But, if you talk to the average user of a program or language that supports them, you will likely Œfind someone that understands them ™a bit,š but does not feel secure enough to really use them for anything complex or with any tool but those they use most often.” 0 likes
More quotes…