Re:Regex character "$" doesn't mean "end-of-string"
by febeling on Wednesday March 20, 2024 @05:28AM
(#39764352)
Seriously, just write one unit test for your regex.
[ Parent
| on HN ]
Re:Regex character "$" doesn't mean "end-of-string"
by mannykannot on Wednesday March 20, 2024 @09:14AM
(#39765987)
Indeed, one should test any regex one puts any trust in, but the problem is that if you take as a fact something that is actually a false assumption (as the author did here), your test may well fail to find errors which may cause faults when the regex is put to use.
This, in a nutshell, is the sort of problem which renders fallacious the notion that you can unit-test your way to correct software.