If you are afraid of unintended matches, that's a different problem, which you might also get writing the regex yourself!
The solution, i reckon, is to create (may be even via the same AI?) a large list of matches, and you manually look thru to see if there's unintended matches.
Modern regex implementations are their own language interpreters/compilers, they implement their own string data strutures, they compile your regex into specialized bytecode (different from the hosting language), they have tons of special cases checks for fast paths (e.g. capturing groups make regexes much much more complicated than they need to be, a regex without capturing has the option to run signficantly faster).
A random search just found out this 2016 SO question[1] where a compiled regex was faster than string.contains (!). Regex is just insanely optimized. It reminds me of C++, ugly and badly/un designed, but it can go fast.
[1] https://stackoverflow.com/questions/2962670/regex-ismatch-vs...
Reading a 100mb file 10 times a day vs. 100 times a day is perfectly acceptable in many scenarios.
If I press a button and one is magically made for me, I can skip that step.
Skipping that step is bad.
However, I'm much more likely to trust a popular library implementation.
GPT-3 is known to be confidently wrong at things like basic arithmetic, so I really wouldn't trust it in scenarios like this. Maybe one day I'll be able to trust NN-generated code without testing it first, but we're not there yet.
So to me this mainly looks like a way for people who don't understand something to put that ignorance into the codebase, setting traps for colleagues down the road. That's not a new experience for me, but this does seem likely to make that easier and more fun, two things I don't think dangerous code needs.
I’d like to see a mathematical estimate of the number of test strings I should generate given some input regex.