I never copy them from stackoverflow because I'm worried it does some weird magic that I don't want. Instead I build them against one or more examples.
I never copy them from stackoverflow because I'm worried it does some weird magic that I don't want. Instead I build them against one or more examples.
There is nothing new under the sun.
Joel, 22 years ago:
There’s a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess. [...] The reason that they think the old code is a mess is because of a cardinal, fundamental law of programming: It’s harder to read code than to write it.
https://www.joelonsoftware.com/2000/04/06/things-you-should-...
I'm not associated with them, and I understand you don't seem to have any real issues with regex, but thought this would be a good place to mention a useful tool.
Which of course always happens at least once or twice in any new dataset/usage.
If I did this all the time, I might not need tools like this. But complex regex are something I only dive in to a handful of times per year, and it's never the same problem twice.
I really appreciate the availability of tools like that.
See also the Emacs built-in M-x re-builder (for elisp-style regexp).
See my sibling comment. Joel says you are just normal.