3 ms·
The joke is not that you shouldn't use regular expressions but that you can't use regular expressions
by duped 1y ago
The joke is not that you shouldn't use regular expressions but that you can't use regular expressions
- da_chicken 1y agoThat is what the joke is. That is often not what is meant when the joke is referenced.
- andrewflnr 1y agoIs it really? Maybe I'm blessed with innocence, but I've never been tempted to read it as anything but a humorous commentary on formal language theory.
- hyghjiyhu 1y agoAn xml based data format is by definition a subset of all valid xml. In particular it may be a regular subset.
- milch 1y agoI swapped out a "proper" parser for a regex parser for one particular thing we have at work that was too slow with the original parser. The format it is parsing is very simple, one top level tag, no nested keys, no comments, no attributes, or any other of the weird things you can do in XML. We needed to get the value of one particular tag in a potentially huge file. As far as I can tell this format has been unchanged for the past 25 years ... It took me 10 minutes to write the regex parser, and it sped up the execution by 10-100x. If the format changes unannounced tomorrow and it breaks this, we'll deal with it - until then, YAGNI