Hacker News new | ask | show | jobs
by cosmie 473 days ago
Could be that they relied on AI to generate the gnarly regex ¯\_(ツ)_/¯
2 comments

Any sufficiently advanced regex is indistinguishable from AI.
Even simple regex ones, since we don't know if they were created by a human or an AI.
With enough if statements, you could create a LLM.
I'm trying to think of a funny way to cite Clark's Law, but failing...
Regexes occasionally get called "black magic", and there is is an inverse of Clarke's Third Law: Any sufficiently advanced magic is indistinguishable from technology.
I think you meant “any sufficiently commoditized magic is indistinguishable from technology”, or “any sufficiently analyzed magic is indistinguishable from science.”
I am still waiting for an LLM trained to focus on effin' regexes and their variants like sed, somebody please do a page with ads for this and you will have a nice little side income and warm fuzzy feeling on top of it.

Natural language -> fully working one, I don't mean some email validators but way more complex stuff. Although, I've recently had a case which was too much even for regexes in any form or spec, then sort of grammar-based parser needed to be done from scratch.

I haven’t had the need for super complicated regexes, but ChatGPT and Claude both worked fine to generate a regex to extract markdown code blocks.