3 ms·
10 lines to replace maybe 20 characters. How horribly verbose.
by qwsxyh 7y ago
10 lines to replace maybe 20 characters. How horribly verbose.
- tW4r 7y agoBut that is exactly what I like about it. I rarely have to use regex, but when I do have to write or change something I always have to spend 15 mins reading (remembering) most of the things about it again, this would help me understand my old code way better.
- mikorym 7y agoThis is good point, and without trying to debate anything, regex is something of an art form for some people and I guess as many people are averse to it as there are high school people hating Shakespear. But to give a bit of substance, you can often use a dictionary type approach in a situation where regex is needed. Example: replacing accented latin with normal (ascii) latin. I do sometimes pride myself in necromancing skills of resurrection old Perl scripts from perlmonks.com but I suspect it is more of a hobby that out of absolute necessity. I find the memes about Perl/Python and Starwars to be pretty funny and much more entertaining than people actually debating programming languages. [1] [1] https://www.python.org/doc/humor/#python-vs-perl-according-to-yoda https://www.python.org/doc/humor/#python-vs-perl-according-t...
- ken 7y agoThat describes all of Python, to an APL programmer.