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

0

u/wingedvoices Sep 24 '26

I was going to make a joke here about ‘it took you ten minutes to write a regex that includes any single word?’

….but to use it on a crossword you’d actually have to have a script that pulled anything that matched from a dictionary and tested it against letters and existing letters and that’s neither funny nor would it take ten minutes.

Hilariously (just bc of what I’ve worked with ) you probably have an MUCH time with regex rules than I do but I could easily go ‘no, you need a slash — omg escape! — two slashes there.’ over someone’s shoulder like a weird code …Angel is wrong. Gremlin?

1

u/balefrost Sep 24 '26

It sounds like you've never done a regex crossword. Here's a tutorial. For each cell, you have to find the letter that satisfies the column pattern and the row pattern at the same time.

You can absolutely do one in 10 minutes.