
Mastering Regular Expressions
by Jeffrey E. F. Friedl · first published 1997
69% recommend29% neutral2% critical
Why HN recommends it
Thorough, readable treatment of how regex engines work, including differences between engines and why one pattern performs badly while another is fast; suits programmers who think they already know regex.
Summarised by Claude from recommending comments
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
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








Mastering Regular Expressions by Jeffrey Friedl, the first edition (a.k.a. "The Perl Edition", http://regex.info/ for more information about the book and its editions) It's my standard litmus test judging a programmer; if you haven't…
on “Ask HN: What is the greatest book you've ever read?” ↗It's the best written computer-related book I've read. On a par with Friedl's "Mastering Regular Expressions". Very highly recommended.
on “Algorithms Behind Modern Storage Systems” ↗…of the O'Reilly Perl collection. Then I was off to the races. Built an app with CGI::Application which ran a client's business for over a decade without many hiccups. Programming Perl by Larry Wall and Mastering Regular Expressions by Jeffrey Friedl are still some of my favourite tech books.
on “Perl Saved the Human Genome Project (1996)” ↗"Mastering Regular Expressions" by Jeffrey Friedl. While reading Dreamweaver 3 Bible I became intrigued by the Find And Replace options which included regular expressions. At the end of the chapter was a reference to Friel's classic…
on “Ask HN: What book changed your life?” ↗…more out of them. All of the Stevens books, but probably UNIX Network Programming to start. I had the TCP/IP state diagram (from TCP/IP Illustrated) taped on my on cubicle wall for a decade or more. Mastering Regular Expressions by Jeffrey E. F. Friedl. You get what's on the tin with this one. I've used RE's to great effect throughout my career and I mostly have this book to thank for it. Programming Pearls by Jon Bentley.…
on “Ask HN: Which books do you consider real gems in your field of work/study?” ↗Early in college I read the first edition of Jeffrey Friedl's "Mastering Regular Expressions" over the course of a long car trip. Still one of the most literate, humane tech books I've ever come across. Pity that the world hasn't yet heeded his call to bury the word "regexp".
on “Which programming book you just couldn’t stop reading from start to end?” ↗Here one should not forget the past, and look to Jeffrey Friedl's excellent "Mastering Regular Expressions".
on “Learn Regex The Hard Way” ↗THE single best ressource to really learn how to deal competently with regex is still Jeffrey Friedl's book "Mastering Regular Expressions". You will profit from it for the rest of your career. (There's also a Regex short reference and a Regex cookbook by O'Reilly...)
on “Stop avoiding regular expressions damn it” ↗Regular expressions. If you want an in-depth book try Mastering Regular Expressions by Friedl. Or for a quick guide, http://regular-expressions.info along with http://rubular.com/ Regex will not only give you new skills for programming (no more splitting strings in weird ways and doing…
on “Ask HN: what can I learn in a week that can greatly improve my work or life?” ↗This helped me master regular expressions: http://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-... once I read that, it was AWK forever.
on “Regular expressions you can read: a visual syntax and UI” ↗As far as regexes, The Sed and Awk book is good, but Mastering Regular Expressions by Friedl is amazing. The amount of time that went into that work is mind-boggling. The deep dives into the differences between different engines and the detailed explanations of why one regex performs…
on “Emacs org-mode examples and cookbook” ↗> On a par with Friedl's "Mastering Regular Expressions". That comparison sold me. You deserve a commission.
on “Algorithms Behind Modern Storage Systems” ↗Have you ever read O'Reilly's "Mastering Regular Expressions" by Friedl? He does a deep dive into the weird guts of regex modifiers. I was obsessed with that book one summer and wrote a bunch of parsers after learning incremental techniques (/o I think), and then…
on “Perl 7 is going to be Perl 5.32, mostly” ↗- Programming Perl - Perl Cookbook - Mastering Regular Expressions
on “Ask HN: My company will buy me books. What should I get?” ↗Jeffrey E.F. Friedl - Mastering Regular Expressions Good one if you asked me.
on “Ask HN: Please recommend me ebooks on Regex and Linux” ↗