Jeffrey Friedl

regex.info · Personal blog · on HN since 2009

Jeffrey Friedl, author of Mastering Regular Expressions, writes about regexes, photography, Exif data, and cycling in Japan.

What HN saysHN commenters recommend his regular expressions book and link his site for tracing the origin of the "now you have two problems" quote.
84HN people shared it
61linked it in comments
25stories submitted
690story points
12 months agolast shared
2009people per year2026

Most-shared posts

  1. 1
  2. 2
    Book
    5 people · first shared 2013
  3. 3
    Homepage
    4 people · first shared 2009
  4. 4
    Exif
    3 people · first shared 2012
  5. 5
    An Analysis of Lightroom JPEG Export Quality Settings
    2 people · 5 points · first shared 2018 · 1 comments on HN
  6. 6
    2006 09 15 248
    2 people · first shared 2020
  7. 7
  8. 8
    Discovering and Cycling Japan’s Biggest Climb
    1 people · 26 points · first shared 2018 · discussion on HN
  9. 9
    Vice magazine outs John McAfee's location in Exif data
    1 people · 9 points · first shared 2012 · 2 comments on HN
  10. 10
  11. 11
  12. 12
    Digital-Image Color Spaces
    1 people · 1 points · first shared 2011 · discussion on HN
  13. 13
    My Visit to a Japanese High School (2008)
    1 people · 1 points · first shared 2013 · discussion on HN
  14. 14
  15. 15

What HN people wrote when they linked it

enobrev · 2009-10-21
I Highly recommend Mastering Regular Expressions by Jeffrey Friedl. http://regex.info/
miles · 2022-08-20
The author, Steve Friedl (brother of Jeffrey Friedl, of regex fame[0]), is not only a wizard but also an inspiration; this article had a huge positive impact on me early in my career. Here are two other times it generated a number of comments on HN: 2008: https://news.ycombinator.com/item?id=411994 2010: https://news.ycombinator.com/item?id=1430968 [0] http://regex.info
DonHopkins · 2022-03-18
Great pun on Jamie Zawinski's comment about regular expressions from the discussion about embedding Perl in Emacs: Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. The article quotes it, but doesn't mention the source. Jamie says he was repurposing an older "sed" quote. Safe testicle-free link: http://regex.info/blog/2006-09-15/247#comment-3085 I bet I've written more and harrier PostScript code than he has, though! And as a monster raving loony, I'll defend PostScript as being “readable” any day! ;) https://www.donhopkins.com/home/pub/NeWS/litecyber/cyber.ps
adolph · 2021-12-02
> For many products today, it’s very difficult or impossible for most people to verify the product works. Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. - Jamie Zawinski via Coding Horror [0] To your point, maybe Zawinski's aphorism is broader than regexp. The quote investigation [1] linked from CH is well worth reading. 0. https://blog.codinghorror.com/regular-expressions-now-you-have-two-pro… 1. http://regex.info/blog/2006-09-15/247
davidpolberger · 2021-11-17
He or she is probably referring to Jeffrey Friedl's classic tome: http://regex.info/book.html
rotifer · 2020-12-25
Jeffrey Friedl has recently updated his blog post [1] (mentioned in the "great top comment"), referencing the various HN discussions over the years. It's all oddly satisfying, in a way... [1] http://regex.info/blog/2006-09-15/247
geocrasher · 2020-08-12
^^^^ I'm not a dev, but regex is so much better when you understand what it's doing (I'm not claiming that knowledge in full!) The Book: http://regex.info/book.html I bought an older edition for a lower price, got through 7 or 8 chapters, and never touched it again- and I STILL gained huge amounts of knowledge and am much better at regex than I ever thought I'd be. Highly recommended!
bane · 2015-09-30
A fantastic resource for understanding this weird market is the "Buying a House in Japan" playlist on this youtube channel [1] He goes through lots of this weirdness in the Japanese market as he looks to buy and restore an older home. I suspect there's a "let's boost GDP with more construction" problem in Japan. It's resulted in lots of fantastic infrastructure, but also bizarre half-formed highways, unfinished bridges, paved over rivers and other things built way out in the countryside. [2] 1 - https://www.youtube.com/playlist?list=PLE0D149A2A50898A3 2 - http://regex.info/blog/2007-03-25/403
AceJohnny2 · 2015-03-03
Zawinsky's classic quote "Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.", was apparently based on military humor where the serviceman thinks to ask an officer... http://regex.info/blog/2006-09-15/247
icambron · 2014-06-04
About eight years ago I finally read Friedl's Mastering Regular Expressions [1]. I know, right? A 500-page book about regular expressions, a tool I already knew (or thought I did). But it's actually a great book-- easy to read and full of genuinely good information on the how and why of regex, and it totally changed my understanding of them. If absolutely anything in this article surprised you, I highly recommend you read the book. [1] http://regex.info/book.html
omegote · 2013-08-18
I've built a couple of Chrome extensions and is something I really recommend. It's easy, useful and satisfying (if you have a userbase). An example. I love checking the EXIF data of the pictures on the internet to know more about how they were shot. I use Jeffry Friedl's Exif Viewer (http://regex.info/exif.cgi). The process was: right click on the image, open in new tab, click a bookmarklet, new tab opens with the exif. Then, I decided to create a super simple Chrome extension that adds an option to the context menu of all images that opens the image in the exif viewer. You can check the (minimal) code here https://github.com/JoseTomasTocino/send-to-exif-viewer, as well as the link to the chrome web store https://chrome.google.com/webstore/detail/send-to-jeffreys-exif-vie/go…
pasbesoin · 2012-05-03
Depending upon your current familiarity with them, read Jeffrey Friedl's O'Reilly book on regular expressions. http://regex.info/ Something to fill the odd moments or hours, unless it becomes a page-turner for you, as it did for me.
Zancarius · 2012-02-08
Your comment reminded me of Jamie Zawinski's tongue-in-cheek quotation "Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems." (http://regex.info/blog/2006-09-15/247) Jestful, off-the-wall comments aside, I love regex. It takes away a great deal of the drudgery associated with processing volumes and volumes of text. I can't imagine not having it. (Aside: Now that you mention it, I can think of a couple people who aren't programmers who use regex pretty frequently because it makes their life a little easier even if it isn't highly advanced, super-dense regex.)
dirkgadsden · 2011-06-10
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 read or don't care to read a book on regular expressions, then I probably don't want to write code with you. It's also useful to remind people who think they're nerds because they own a smartphone and can download "apps" that they're in a league far below.
novas0x2a · 2011-05-06
You might have "minimize embedded metadata" checked in the export options; uncheck it and I bet the serial will survive the export. Also, if you want more control over exported metadata, Jeffrey Friedl made a plugin[1] for that. I haven't used this particular plugin; I do however use his flickr and geocode plugins, and they're both great. 1) http://regex.info/blog/lightroom-goodies/metadata-wrangler
burntsushi · 2024-06-20
Yeah I didn't mention Friedl because I've dumped on him in the past, and didn't want to belabor it. But Friedl definitely didn't start this. According to him, he was just using what was common vernacular even back then: http://regex.info/blog/2006-09-15/248 (Note that blog is from 2006, but he's actually quoting himself from ~10 years prior to that in 1997.) But... he is the one who ultimately installed this ambiguity into a classic book that is still read to this day. So I think he can at least be blamed for popularizing the confusion. And especially since the entire book is framed around "NFA" and "DFA" regex engines. It's not like it was just some one-off mention. The mix-up is baked into the conceptual fabric of the book. The landscape also looked different back then. It predated RE2 for example, and RE2 is, I think, principally responsible for bringing "backtracking semantics" to finite automata oriented engines. So Friedl's book is forever stuck in a false dichotomy that only happened to exist back when he wrote it.
jacobolus · 2015-12-02
A tricky thing w/r/t browsers is that they are often really crappy at figuring out what color space a PNG image is supposed to be in. I think they often intentionally strip out the color space info from PNG images for the sake of helping PNG images blend smoothly into CSS / Flash / etc., for which they also don’t do correct color management. [The CSS spec says that colors should be interpreted as sRGB, but browsers don’t actually follow the spec.] As a result of this problem, it’s difficult to judge whether image resizing specifically is being done incorrectly, or whether the image is just being interpreted incorrectly at any size. You’ll notice if you open your first test image (http://www.4p8.com/eric.brasseur/gamma-1.0-or-2.2.png) in Apple’s Preview app, you get the correct behavior, but this is different from the behavior in Safari, for example, which shows something incorrect at every size. Stranger still, the behavior in Safari is roughly “correct” while resizing a browser window, but as soon as you let go of the mouse, it reverts to being incorrect. There are multiple possible ways to embed color space info into PNG images, and the PNG spec is actually really terrible and confusing on this subject which results in lots of inconsistencies from one implementation to another. If I remember correctly some of them are treated better by browsers than others, but I’m not sure if there’s a way to encode images such that it will be handled properly everywhere (I mean,…
smitty1e · 2025-11-15
shlomo_z · 2025-01-15
... Then ChatGPT came along and I had 3 problems! https://regex.info/blog/2006-09-15/247
kimmeld · 2024-03-14
Mangling the quote about regexes… http://regex.info/blog/2006-09-15/247 Some people when confronted with a problem, think “I know, I’ll use a different language to generate another language.” Now they have two problems.
mikequinlan · 2024-01-23
https gives a 404 Not Found error. You need to use http://regex.info/blog/2006-09-15/247
niuzeta · 2023-12-31
What does the famous saying in the first paragraph actually say? The phrase is hyperlinked, and it 404s for me: https://regex.info/blog/2006-09-15/247 It's quite odd to see a dead link from a post made literally today.
bmn__ · 2022-03-05
Collapse that indirect pointer. The source is http://regex.info/blog/2006-09-15/247
pkroll · 2021-04-23
The person who originally said 'Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.' is Jamie Zawinski. And it's an amusing quote, but, that doesn't mean it's generally correct. In the original context, this was more about Zawinski's utter hatred for Perl. http://regex.info/blog/2006-09-15/247
s_gourichon · 2021-03-07
This might make sense for "big" projects, with already several languages and an important need. Else it's not obvious if the burden of having yet another dependency has a favorable benefit-cost result. In other words, the danger of "now you have two problems" should be considered. http://regex.info/blog/2006-09-15/247
alfanick · 2021-02-22
Adobe Lightroom catalog - sqlite is used for lrcat, which can hold hundreds of thousands metadata of pictures and (non-destructive) edit sequences on those pictures. Some examples [0][1], or just play with it yourself. [0]: https://dphacks.com/2019/05/07/how-to-search-multiple-lightroom-catalo… [1]: http://regex.info/blog/2006-07-29/221
shagie · 2018-09-15
Being a perl/regex person back in the day, I recall having Mastering Regular Expressions as a well thumbed reference book. The author, Jeffrey Friedl ( http://regex.info/blog/jfriedl-links/about ) worked at Yahoo! Finance at the time. It was a most impressive and useful site in its time.
rockwotj · 2017-08-14
To quote the famous: Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. Source: http://regex.info/blog/2006-09-15/247
grue2 · 2017-07-09
Suspension bridge cables are made of smaller cables. And those smaller cables are made of yet smaller cables. For example: http://regex.info/i/JEF_042406.jpg That's my guess.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close