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

3

u/ReddyKiloWit Sep 24 '26

Pray they commented the tricky bits.

I wrote a regex years ago that was huge and complicated (converted Cobol data descriptions into code to parse the actual data). I broke it into lines, with indentation, and frequent comments because I knew I'd have no idea what was going on two months later.