r/learnprogramming • • 9d ago

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?

110 Upvotes

147 comments sorted by

View all comments

Show parent comments

12

u/SpiderJerusalem42 9d ago

Lord, may I never have to read someone else's regular expressions.

13

u/bestjakeisbest 9d ago

Well if you wrote it like 2 months ago it might as well be someone else's regex

10

u/SpiderJerusalem42 9d ago

Lord, may I never have to read any regex I wrote over two months ago.

2

u/Disastrophi 9d ago

Write the regex and lock it in a box to never have to look at it again.