Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Hate Regex? This Free Tool Writes It for You (rgx.tools)
12 points by themendelson 16 days ago | hide | past | favorite | 9 comments
Hey HN, As an afternoon project, I created a simple tool that generates regex expressions from plain text using GPT-3.5.

It's designed to help anyone who needs to quickly create regex patterns without manually writing them.

Already posted this last week, but I did some QOL improvements & fixed minor bugs I found.




Suggestion: have GPT-3.5 also write out unit tests, both strings that should pass and ones that should fail, and run the JS version of the regex on that in-browser.


I find it's interpretating the intention of and figuring out the unhandled edge cases of an existing regex that drives me away from them. A tool you can ask "Hey how are you? Given this regex and this code context how will this fail?" would be valuable (always have to be nice to the AI)


Neat. I wish that I could test the regex immediately in the browser. Tools like regexr.com are great for convincing myself that my regex works.


There is absolutely no way I'm unleashing a regex on my system that's written by an AI. One of the biggest problems with RegEx isn't composing them, it's being able to read and understand them; they're a perfect example of something you shouldn't generate like this, because they're inscrutable and hard to check. I have difficulty reading RegEx when I'm the one who wrote it. Hell, I have a hard time keep complex RegEx straight in my head /while/ I write it.


Does this do anything beyond an API call? ChatGPT is already pretty good at regexes.


Having fun trying various permutations of "a base x number divisible by y".


Begging people to understand that they'll lose more time to debugging this AI output than it would take to learn something that isn't very difficult.


regex is one of those things that people constantly bounce off of, for what seems to me purely aesthetic reasons, that's actually not that hard to understand. you just have to read every symbol individually.


This is brilliant!




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

Search: