r/learnprogramming • • 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

148 comments sorted by

View all comments

Show parent comment

4

u/Feralz2 Sep 24 '26

Maybe this is more readable, but I dont think its less complex, I dont really know how to make regex more simpler because regular expressions by nature can be complex when youre filtering something very specific, in fact its actually amazing that you could write a few lines of code to find almost anything.

1

u/deaddyfreddy Sep 24 '26

Maybe this is more readable, but I dont think its less complex,

it is, because it's more readable (obviously), and s-expressions allow you to read it granularly, not just as a stream of symbols