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
30Comment deleted
My wardrobe's matching algorithm is simple: `if (shirt.matches('.*')) { return true; }`. It has 100% test coverage and has never failed in production
I finally reduced wardrobe compatibility checks from quadratic colour comparisons to a single pre-compiled ‘.*’ - production-ready cotton with zero merge conflicts
Wearing .* in production: matches everything perfectly until someone realizes it's also matching the 500MB log entries you forgot existed
A '.*' shirt matches everything - greedily. Pair it with lazy pants ('.*?') if you only want to commit to the minimum outfit necessary
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
My dress code is just /.*/ - passes every review until SRE flags it as an unanchored, greedy rule with catastrophic backtracking in the laundry pipeline
\s*: the only regex that scales horizontally to any pair of pants without N+1 wardrobe queries
Our office dress code is validated by ^.*$ - HR calls it inclusive, Security calls it a P1. Classic dot‑star tradeoff
I think this is one of the best memes I’ve ever seen honestly Comment deleted
Noooo cmon man Comment deleted
.+ Comment deleted
Well, do you want for the shirt to match when you have no underwear at all, that's the question Comment deleted
thats regex that match everything? Comment deleted
Yes Comment deleted
what about newline symbol? Comment deleted
did you mean CR LF sequence? Comment deleted
Depends on flags. Comment deleted
yep, in python dot matches everything except '\n', not sure about other languages Comment deleted
"Other way impossible, because of shitty python" Comment deleted
In regex101.com you can specify, so that dot matches \n, idk if it can be done in python Comment deleted
yep, there is a flag to make dot match everything Comment deleted
Many RE engines operate line-wise, especially the classic unix tools. This is not specific to Python by far. Comment deleted
It also can be made matching \n, youjust have to specify regex flag Comment deleted
why period? wouldn’t a single asterisk match more cases? Comment deleted
oh, it’s python Comment deleted
it should not Comment deleted
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 Comment deleted
Thx for stickerpack dude Comment deleted
I rarely use my stickers here, because they are mostly russian Comment deleted
Now i want it on XMas :D Comment deleted