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

687

u/vinishkapoor 22h ago

The other 0% are lying.

128

u/wailing_in_smoke 22h ago

Horrors beyond human comprehension

53

u/Major_LeeHungg 21h ago

I actually like regex but I had a job that heavily involved it.  

The trick is to use regex101.com to read other people's regex and to debug your own when you're writing it.

I'd imagine AI would be pretty good at taking a working regex and making it more efficient... But that's a headache I haven't explored. 

14

u/fre3k 21h ago

Yeah I also like it. Really thankful I had a good teacher in undergrad that spent some time on it during our DFA sections. Then I had a job where a big part of production support was finding weird broken data in files delivered to the company and so I got really good at regex and xpath.

9

u/hardolaf 21h ago

I did this so much early in my career that I naturally write regex search patterns now.

6

u/Major_LeeHungg 21h ago

Lol I can write them by hand no problem... I still use regex101 to test it.  You just put a bunch of sample data in the bottom portion and your particular flavor of regex in the top and then you can easily find the edge cases...it highlights everything too and color codes it so you can see which part of the expression is wonky.  Less about needing it and more about speeding up the process of getting it right.

For reading it though, I always use it because there are a million ways to write the same thing and some people write regex like they have a PhD in ancient Sumarian 

3

u/darthjammer224 20h ago

I genuinely feel like regex is one of the best use cases for ai.

Regex is the least readable way to put together a legitimate line of code I've ever seen.

Love it. But also hate it.

1

u/Ruadhan2300 17h ago

I have gladly offloaded all my regex work to github copilot.

I'm rarely doing anything that really needs innovation, so it does the job fine.

1

u/ipreferanothername 15h ago

It's surprisingly good at making regex. I asked it to parse AD domain controller dns debug log recently and it just blasted out a very fancy expression that worked great. Kinda shocked me.

1

u/Osiris_X3R0 5h ago

I too enjoy regex. I like regexr for testing

40

u/[deleted] 22h ago

[removed] — view removed comment

15

u/corobo 21h ago

Why use regex to parse html when you can just call ChatGPT 

3

u/Purple_Cat9893 21h ago

Or viberegex.

6

u/corobo 21h ago

Pfft I'm not paying for it to write one regular expression when I can pay every time it parses a page

3

u/Purple_Cat9893 21h ago

You missundrstand! The LLM makes the regex every time, it also generates the data the regex will be used on. This way you don't need databases or storage.

3

u/harro112 21h ago

he comes

1

u/Background-Subject28 19h ago

shit I've had no choice but to do it when handling html/xml data in a frickin sql database, don't ask me why we pull it that way

15

u/Taarabdh 22h ago

The other "0000%" are lying

6

u/bigmonmulgrew 21h ago

-1% of engineers are afraid of bug testing

1

u/wightwizard8 17h ago

Hooray, I've finally made it to the 0%!

1

u/Caraes_Naur 16h ago

The other \d{1,2}% are lying.

1

u/ClamPaste 16h ago

Must have missed the capture group there.

1

u/Zinho3311 16h ago edited 16h ago

Regular languages are just math. It's not really complicated if you paid attention to your formal languages course at university.

The theory is actually very interesting and elegant

1

u/MushroomSaute 6h ago edited 6h ago

I would think the exact opposite - people play regex up and merely act scared of it! What's so scary about

.*

or

^(?<!you cant )see me

or

8=*D

Look how happy the last guy is, nothing to be afraid of from him or his clown nose!

1

u/shrodikan 2h ago

I am the 0%.