3 ms·
Pretty neat, and it definitely can generate some complex regex.. But I have to say I don't trust it! When I add a regex to something, I pretty much always also
by gregmac 4y ago
Pretty neat, and it definitely can generate some complex regex.. But I have to say I don't trust it!
When I add a regex to something, I pretty much always also add a bunch of unit test cases for it, and I request the same if I see one in a PR. It's much easier to just see a bunch of test cases that help validate than it, and frankly, half the time when I write my own cases I think of situations that could be better handled.
Human- or GPT-generated doesn't really matter IMHO; it still needs tests.
Interestingly, chatGPT is pretty good at generating test cases for regex. It would be really cool to see that functionality integrated to this tool.
- l33t233372 4y ago> chatGPT is pretty good at generating test cases for regex I think this is the biggest part. Automatically generated test cases for regex will make verifying regex way easier. Even better, when you come across some ridiculous unknown legacy regex you can ask for an explanation of it and for test cases to verify that explanation.