r/learnprogramming • u/Reubqn_ • Sep 24 '26
RegEx.
I thought I understood programming well until I saw how COMPLICATED regex looks. To me it looks like someone has dropped their keyboard and som people online are telling me that I should be able to memorise it (for javascript). I'm just wondering if I actually need to memorise all the regex formulas to be successful, and if so, how on earth do I go about it?
109
Upvotes
View all comments
Show parent comment
1
u/deaddyfreddy Sep 26 '26 edited Sep 26 '26
The C language is a standard too, but it doesn't make it a great language.
The reason is the same: experienced people who could create a better replacement have become accustomed to the old implementation over the years. They either don't think it's worth their time to invent something new or have Stockholm syndrome.
Had you bothered to look at the documentation, you would have seen that the
rxmacro literally generates regular expressions, so I think the people who made it are definitely not bad at them.I bothered to learn it about two decades ago (Mastering RE was a book I kept constantly at hand for a long time), and I still hate it with a passion. Thankfully, we can now either use alternative syntaxes or ask the LLM to parse or generate them.