Skip to content
DevMeme
3729 of 7590
Languages Post #4068 · source on Telegram

Regex Fashion: The Universal Match

Description

A two-part meme. The top section has text: "Normal folk: Noooooo I can't wear this outfit, the shirt doesn't match!". The bottom section, labeled "Me:", shows a person wearing a navy blue t-shirt. The shirt has a large white graphic on it: a dot followed by an asterisk (`.*`). This is the regular expression pattern for "match any character (`.`) zero or more times (`*`)". The technical joke is that in the world of regular expressions, `.*` is a wildcard that matches literally anything. The meme humorously contrasts a common social concern (mismatched clothes) with a developer's mindset, where a universal "matcher" is the perfect, logical solution, demonstrating a practical but nerdy approach to fashion. It’s a classic developer pun that finds humor in applying programming concepts to everyday life

Comments

30
Anonymous ★ Top Pick My wardrobe's matching algorithm is simple: `if (shirt.matches('.*')) { return true; }`. It has 100% test coverage and has never failed in production
  1. Anonymous ★ Top Pick

    My wardrobe's matching algorithm is simple: `if (shirt.matches('.*')) { return true; }`. It has 100% test coverage and has never failed in production

  2. Anonymous

    I finally reduced wardrobe compatibility checks from quadratic colour comparisons to a single pre-compiled ‘.*’ - production-ready cotton with zero merge conflicts

  3. Anonymous

    Wearing .* in production: matches everything perfectly until someone realizes it's also matching the 500MB log entries you forgot existed

  4. Anonymous

    A '.*' shirt matches everything - greedily. Pair it with lazy pants ('.*?') if you only want to commit to the minimum outfit necessary

  5. Anonymous

    The shirt matches everything because it's '.*' - though in production, you'd want to be more specific with your patterns to avoid catastrophic backtracking. But hey, at least it's not '/.*/' without the multiline flag, or you'd only match the first line of your outfit

  6. Anonymous

    My dress code is just /.*/ - passes every review until SRE flags it as an unanchored, greedy rule with catastrophic backtracking in the laundry pipeline

  7. Anonymous

    \s*: the only regex that scales horizontally to any pair of pants without N+1 wardrobe queries

  8. Anonymous

    Our office dress code is validated by ^.*$ - HR calls it inclusive, Security calls it a P1. Classic dot‑star tradeoff

  9. @asuender 4y

    I think this is one of the best memes I’ve ever seen honestly

    1. @gotboredanyway 4y

      Noooo cmon man

  10. @mnik01 4y

    .+

    1. @f3rr0us 4y

      Well, do you want for the shirt to match when you have no underwear at all, that's the question

  11. @average_meni_na_drugu_enjoyer 4y

    thats regex that match everything?

    1. @dsmagikswsa 4y

      Yes

  12. @xgoader 4y

    what about newline symbol?

    1. dev_meme 4y

      did you mean CR LF sequence?

    2. @Araalith 4y

      Depends on flags.

  13. @xgoader 4y

    yep, in python dot matches everything except '\n', not sure about other languages

    1. dev_meme 4y

      "Other way impossible, because of shitty python"

    2. @affirvega 4y

      In regex101.com you can specify, so that dot matches \n, idk if it can be done in python

      1. @xgoader 4y

        yep, there is a flag to make dot match everything

    3. @CcxCZ 4y

      Many RE engines operate line-wise, especially the classic unix tools. This is not specific to Python by far.

    4. @a_desant 4y

      It also can be made matching \n, youjust have to specify regex flag

  14. @Rumbatutumba 4y

    why period? wouldn’t a single asterisk match more cases?

  15. @Rumbatutumba 4y

    oh, it’s python

    1. dev_meme 4y

      it should not

    2. @affirvega 4y

      It's regex. Dot matches any character, star specifies that there can be 0 or more of any character So it matches 0 characters or any sequence of characters

  16. @picolino 4y

    Thx for stickerpack dude

    1. dev_meme 4y

      I rarely use my stickers here, because they are mostly russian

  17. Deleted Account 4y

    Now i want it on XMas :D

Use J and K for navigation