Hacker News new | ask | show | jobs
by NotAnOtter 515 days ago
Idk why anyone would ever "learn regex's" without the use of a look up table. It's not like timestables where having it memorized will really accelerate other aspects of life. Knowing what ^ does by memory will almost never benefit you.
2 comments

It does come in handy if you search for stuff with regular expressions a lot!
I do search with regex pretty often and as a result have memorized these, but if I was mentoring someone I would never encourage them to memorize it.

Start with . and .*, then add additional stuff as you get comfortable

Quite. I use regex a lot, but mostly in bursts. Sometimes I still have to check how a negative lookbehind goes! The important thing, as with everything, is to try to keep in mind what is and isn't possible, even if you don't keep the specific syntactic details in your mental L1 cache.
Depends if you decide to use vim as an editor. By now it's second nature (even though I'm nowhere near a vim master and struggle) this is one thing I use often.