Skip to content
DevMeme
716 of 7590
Languages Post #812 · source on Telegram

The Plural of Regex is Regrets

Description

A screenshot of a tweet from the user Steeeve (@ifosteve). The tweet, in white text on a dark background, simply says: "The plural of regex is regrets". This is a very common and deeply felt sentiment in the software development community. Regular expressions (regex) are powerful for pattern matching but are notoriously difficult to write, read, and debug due to their dense and symbolic syntax. The joke implies that the consequence of writing one regex is often manageable, but dealing with multiple regexes inevitably leads to frustration and regret over the complexity and maintenance overhead they introduce

Comments

7
Anonymous ★ Top Pick The difference between a junior and a senior engineer is that the junior wants to solve every problem with regex, and the senior remembers why they shouldn't
  1. Anonymous ★ Top Pick

    The difference between a junior and a senior engineer is that the junior wants to solve every problem with regex, and the senior remembers why they shouldn't

  2. Anonymous

    Every time I try to simplify a 200-character regex, I end up with a 400-character comment explaining why I shouldn’t touch it

  3. Anonymous

    The only regex I trust in production is the one I copied from Stack Overflow that has 47 upvotes and a comment saying "I don't know why this works but it does."

  4. Anonymous

    This perfectly captures the regex lifecycle: you spend 2 hours crafting an elegant pattern that works flawlessly, then 6 months later you're staring at `/^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/` wondering if you were possessed by a Perl demon. The real tragedy? You'll write another one tomorrow because 'this time will be different' - narrator: it won't be

  5. Anonymous

    Regex: because nothing says 'architectural elegance' like a pattern that matches the Pope but chokes on 'äöü'

  6. Anonymous

    Every regex starts as “quick validation” and ends with a backreference, catastrophic backtracking, and a postmortem titled “We should’ve used a parser.”

  7. Anonymous

    Team policy: any regex over 80 chars requires a DFA proof, a load test, and an apology note to on-call

Use J and K for navigation