logoalt Hacker News

lou1306today at 11:02 AM2 repliesview on HN

They're searching for multiple substrings in a single pass, regexes are the optimal solution for that.


Replies

noosphrtoday at 11:09 AM

The issue isn't that regex are a solution to find a substring. The issue is that you shouldn't be looking for substrings in the first place.

This has buttbuttin energy. Welcome to the 80s I guess.

show 4 replies
BoppreHtoday at 11:10 AM

It's fast, but it'll miss a ton of cases. This feels like it would be better served by a prompt instruction, or an additional tiny neural network.

And some of the entries are too short and will create false positives. It'll match the word "offset" ("ffs"), for example. EDIT: no it won't, I missed the \b. Still sounds weird to me.

show 2 replies