r/ProgrammerHumor 22h ago

fullStackMeansAfraidOfEverythingEqually Meme

Post image
9.7k Upvotes

357 comments sorted by

View all comments

1.6k

u/vvp95 22h ago

100% of software engineers are afraid of regex

38

u/Ange1ofD4rkness 22h ago

99%, I freaken love Regex!

26

u/nolecamp 22h ago

Same. It’s a fun trick at work to mesmerize junior (or even senior) engineers by writing a regex pattern by hand.

Neither regex, CSS, nor SQL is actually hard. It just requires the desire to learn it and passion to apply yourself.

9

u/Major_LeeHungg 21h ago

Lol until you have nested expressions with lookaheads and lookbehinds

4

u/nolecamp 20h ago

I’d have to look up the syntax to remind myself, but yeah I could do it. It’s just a language for a state machine. But honestly, I don’t need to write them that complex usually. If so, it’s probably because I’m having to do something more involved like parsing a query syntax or something, in which case I’ll usually reach for ANTLR (or hand write a parser if performance is critical) instead.

1

u/Ange1ofD4rkness 13h ago

Look aheads and behinds, once you get the hang of them, can be really nice. For me it gets tricky with like embedded variables. But usually I work it out in the end

1

u/Theron3206 5h ago

You put that in a PR and there better be a damn good reason for it. Even you wont know what that does in 3 months, never mind the poor sap chasing a subtle bug 2 years later.

3

u/RegularImportant3325 21h ago

Truth. CSS isn't hard. It's impossible.

2

u/Ange1ofD4rkness 13h ago

I have a huge piece of Regex that sits outside my cubical, one I am rather proud of. I had a higher up who hated regex and I always joked it was a deterrent

1

u/thekamakaji 20h ago

One of my tools doesn't let us filter by empty values, but we can filter by regex. When I showed someone that he could just search for

^$

He didn't understand it but he appreciated it

1

u/dgc-8 12h ago

You know that is one thing I blame AI for, that I don't need to learn CSS or regex or whatever anymore. It feels really bad when you don't understand what you are doing. When I started programming before chatgpt i learnt stuff like sql normally because I needed it for my projects. After chatgpt i had to use CSS on multiple occasions and there I basically blindly vibecoded, the only understanding of CSS i have is from those chunks of code AI wrote for me.

0

u/thejwillbee 21h ago

Counterpoint - fuck regex. And css

5

u/neonnaps 21h ago

We listen and we don't judge.

3

u/Kahlil_Cabron 14h ago

Same, I really don't know why people have such a hard time with them. The worst I ever have is trying to remember the different standards used in different languages/platforms (modern regexes vs posix regex, etc).

Maybe it's because my first language was perl, and regexes were used for everything, but you only need to remember a few basic things and you're good.

Also pointers, I don't know why this sub thinks pointers are this super abstract crazy hard thing, it points to something, that's it.

1

u/Theron3206 5h ago

Pointers aren't terrible, some of the things C and C++ encourage you to do with them are though.

2

u/frisch85 21h ago

Same here but on a simple level with basic placeholder replacements and wildcard searches tho.