this post was submitted on 14 Feb 2025
904 points (98.4% liked)

Programmer Humor

22250 readers
635 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 1 month ago (16 children)

Never debug regex, just generate a new one. It's not worth the hassle to figure out not only what it does, but what it was meant to do.

Better yet, just write it out in code, and never use regex. Tis a stupid thing that never should have been made.

[–] [email protected] 17 points 1 month ago* (last edited 1 month ago) (13 children)

Hard disagree. The function regex serves in programs like Notepad++ can't be easily replaced by "writing it out in code". With a very small number of characters you can get complex search patterns and capturing groups. It's hard to read but incredibly useful.

[–] kunaltyagi 7 points 1 month ago* (last edited 1 month ago)

Can't upvote twice, have a low effort comment instead

load more comments (12 replies)
load more comments (14 replies)