3 ms·
The point of this post is that even though the regex behaves correctly (input x produces expected output y), you also need to consider performance constraints.
by Niksko 10y ago
The point of this post is that even though the regex behaves correctly (input x produces expected output y), you also need to consider performance constraints.
Without fuzzing, it's going to be pretty difficult to come up with enough test cases to thoroughly test a regex.
- qw 10y agoWouldn't the same apply to a custom method? Why would code using a combination of indexOf(), substring() and trim() be any less foolproof on arbitrary data?
- deleted 10y ago[deleted]