Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have learned regex, I learned it from regexone years ago so appreciate this type of teaching method. What I will say though it it's a little pedantic if you won't let me move on despite my solution being correct. An example is this:

[dbf]eer

When the answer required was (if I remember correctly):

[bdf]eer

I think as long as you're correct you should be allowed to move on. By all means show your preferred solution.



What's also a bit of a pain is when you click Show Solution you still have to type it in the box to continue.

Apart from that I love it! I normally use regexr.com and just mess around with it until I get the desired result. It also helps with learning, but you end up never truly understanding the concepts.


For most purposes, sites like that or https://regex101.com/ are fine. But, small differences in regexes (greediness, backtracking) can make huge performance differences that you won't notice when testing it on 2 or 3 lines on a site like that.

A nice example was a big Cloudflare outage in 2019: https://blog.cloudflare.com/details-of-the-cloudflare-outage...

So for anyone using regex in (1) production as (2) part of an automation / regular process (i.e. not a one time search) on (3) sizeable amounts or reoccurrences of data, I'd really advice gaining a deeper understanding of what the various options do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: