DEV Community

Discussion on: How do you regex?

Collapse
 
dan_starner profile image
Daniel Starner

No judgements found!

I tend to learn on the fly as I'm trying to implement something, so it probably means I am going to immediately use the idea if I am learning something new concerning regular expressions. This is also predicated on the fact that I've been using them with regular consistency for 4-5 years so I have a firm foundation in the basics. If I am looking something up, its usually related to Named Groups (I always forget the exact syntax), Lookarounds, and Conditions. The latter two only get used in very rare & complex scenarios, so I don't bother committing them to memory fully.

When I was just getting started, I just spent a day on regex101.com/ trying to build different expressions to match different strings to see how it would work. This learning was compounded by the fact that Django used to exclusively use regular expressions for route matching, so it "forced" me to work with them.