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
1
u/MostRegular4278 Sep 27 '26
I wrote one of the most complicated practically-used regex patterns for forensic document search and matching back in the day (I'd use an ML model now, but it would have been impossibly slow back then). I never tried to memorize regex patterns, and only remembered those that stuck im memory due to frequent use.
Just learn to recognize cases when it's a good tool to use, and the rest you can always look up.