News for hackers. Stuff that matters.
Re:Show HN: Regex.ai – AI-powered regular expression generator by florianfmmartin on Tuesday March 28, 2023 @08:04AM (#35339429)
How about instead of an AI generating a regex we can't understand, we put energy using actually well developped method for parsing & validating text? Why put code you can't understand in your database?

For complex inputs, use actual peg parsers : https://docs.rs/peg/latest/peg/

For simplet inputs, express your intent with readable methods using a lib : https://github.com/sgreben/regex-builder/ & https://github.com/francisrstokes/super-expressive

Re:Show HN: Regex.ai – AI-powered regular expression generator by column on Tuesday March 28, 2023 @09:00AM (#35340270)
Reality check : there are people like my colleague who aren't software engineers and still have to occasionally maintain/create a regex in some corporate software config.
Re:Show HN: Regex.ai – AI-powered regular expression generator by soiler on Tuesday March 28, 2023 @02:40PM (#35345850)
That's even worse. They might not have the knowledge to realize the regex an AI gives them is bunk, or to debug it when it fails.

I'd like to see some numbers on a tool like this. If a huge majority of people are seeing genuine improvements in their workflow with it, I won't be a luddite yelling at them. Rare, low-severity failures shouldn't hold us back.

But the potential cost of failure with (any) regex is very high, so I personally wouldn't want to trust any remotely mission-critical to a person who doesn't understand regex well enough to write it themself, and if they can write it on their own that's often faster than debugging AI-generated regex.

Re:Show HN: Regex.ai – AI-powered regular expression generator by thunky on Tuesday March 28, 2023 @09:02AM (#35340289)
> How about instead of an AI generating a regex we can't understand

Would you feel better if it generated a regex-builder expression instead of a regex?

Even if regex-builder generates a regex under the hood?

In any case, the regex itself is only an implementation detail.

Re:Show HN: Regex.ai – AI-powered regular expression generator by b5n on Tuesday March 28, 2023 @12:29PM (#35343687)
Once you know regex well enough to replace regex you realize that regex is pretty well developed.

There are certainly cases where different parsing methods/grammars are a better fit, but regex shines in many places.