Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just because it spits out a RE doesn't mean the RE is what you wanted. For one thing, you'll need to be precise in your prompt.


You don't need to be precise. Just give it an example string and tell it what information you want to extract from it and it usually works. It is just way faster than doing it manually.


Claude/ChatGPT has become my man pages.


Rhetorical question: Can you ever fully be sure you have the regex you wanted?


Writing regexes by hand is hard so there will always be some level of testing involved. But reading a regex and verifying it works is easier than writing one from scratch.


My overly snide point about regexes was that most of the time "verifying it works" is more like finding and fixing a few more edge cases on the asymptotic journey towards no more brokenness.


Yeah I agree with that! 100% test coverage seems impossible when every part of the regex is basically an if condition.


Yeah, in line with the old RE adage: I had a problem. I used AI. Now I have two problems.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: