3 ms·
1. Nobody on HN is saying to never use a regexp 2. It's not a ludicrous example 3. A parser is not a ludicrous way to solve the above problem 4. It's not a stra
by peterwwillis 11y ago
1. Nobody on HN is saying to never use a regexp 2. It's not a ludicrous example 3. A parser is not a ludicrous way to solve the above problem 4. It's not a straw man because it's not an irrelevant argument set up to be defeated, it is specifically an example of how EITHER using some simple functions OR a parser would be less problematic in practice than the gradual bit rot of erroneous use of the extremely powerful and unnecessary regular expression 5. The software becomes nontrivial when you complicate it with regular expressions 6. Where are these examples of people telling you never to use regular expressions 7. How is it you run into this on a very regular basis 8. If it's a simple question it probably has a simple answer and regular expressions are not simple as my example has shown 9. There's a reason this phrase is a truism and it doesn't need a mathematical proof to be accepted as a truism 10. Code however you want dude, it doesn't matter what a bunch of people on StackOverflow or any other website say except that 11. If a lot of people keep saying the same thing, there might, just might, be some merit to it.