406
Expressions (lemmy.nz)
top 15 comments
sorted by: hot top new old
[-] akunohana@piefed.blahaj.zone 31 points 1 week ago
[-] rockSlayer@lemmy.blahaj.zone 27 points 1 week ago
[-] Aatube@lemmy.dbzer0.com 16 points 1 week ago

none of the meat of the regex shown, 0/10

[-] PumaStoleMyBluff@lemmy.world 12 points 1 week ago

Probably because showing your email regex publicly is a great way to get 1000 messages about obscure edge cases you're not handling ๐Ÿ˜›

[-] whats_a_lemmy@midwest.social 5 points 1 week ago

One star. Too readable, would not write again

[-] aMockTie@piefed.world 12 points 1 week ago* (last edited 1 week ago)

Why waste time doing any matching if wantarray == false? Just do:

if(!wantarray) { return 1; }

Before any matching happens, or if you only want one return statement set the value of a variable in if(!wantarray)/elsif(regex) and return that variable at the end.

[-] marcos@lemmy.world 10 points 1 week ago

That Perl. You never know if return doesn't have some kind of hidden behavior that uses the local variables...

Well, you could read the perldoc page on it. But you can't just assume it.

[-] death_to_carrots@feddit.org 7 points 1 week ago

If regular expressions are your solution, than your problem is wrong.

[-] daychilde@lemmy.world 5 points 1 week ago

Some people, when confronted with a problem, think, โ€œI know, I'll use regular expressions.โ€

Now they have two problems.

[-] jjj@piefed.blahaj.zone 7 points 1 week ago* (last edited 1 week ago)

Counterargument: ctrl+f is a great place for regex. Write once read never problems are a great application for unreadable languages. Imagine if people wrote scripts in the language vi uses for editnigbceediting, which mostly isn't even displayed as it's typed!

But yeah, it's kind of terrible for anything else.

[-] themaninblack@lemmy.world 2 points 1 week ago

Should be at the top.

[-] MaggiWuerze@feddit.org 6 points 1 week ago

That's just sad expression with extra steps

[-] naeap@sopuli.xyz 5 points 1 week ago

At least the cat is happy again now after getting adopted

I'll forever be sad trying to understand the regex I've written myself...

[-] sit@lemmy.dbzer0.com 4 points 1 week ago

Doggy is not smiling but trying to lose heat. Doggy is the real regular expression

[-] janus2@lemmy.zip 2 points 1 week ago

similarly, cats don't usually express emotions with their face (and often don't express them at all)

this post was submitted on 28 Sep 2026
406 points (98.3% liked)

Programmer Humor

33564 readers
1520 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS