C
C#11mo ago
OkOk

❔ Smart Regex

Is there some general Regex that websites apply to find the most matching alternative from a list of words? Example: A customer searches for "DogService.v1.Google" Now the regex needs to be able to determine if that is closer to one of these two alternatives: "CatService.V1" "DogSvc.Google"
8 Replies
NotAPythonEnjoyer
ask chatgpt
OkOk
OkOk11mo ago
That does not help me at all, I'm asking if there is some kind of industry-relied upon regex for general search-usage
Azrael
Azrael11mo ago
String similarity search or what?
OkOk
OkOk11mo ago
Exactly, which is most similar I found the answer, it was called "Fuzzy string matching" and there are packages in python,
Azrael
Azrael11mo ago
Fuzzy matching :)
cap5lut
cap5lut11mo ago
fuzzy search/matching is just one part of the whole thing. this is usually just about string comparison but ur example is more than that, it also needs some kind of semantic decisions. the latter is the most problematic one, either use some heuristics to build a decision tree, or throw some Ai based classification on it. i do not have good enough experience in either of that to lead u to an answer, but it should give ya some hints what u r looking for. (and throw regex as a word out of this. regular expressions are well structured/defined expressions for string matching without semantics, this isnt what u are looking for)
OkOk
OkOk11mo ago
Thank you for the info My list will only be 30 items so I'll try Fuzzy Matching
Accord
Accord11mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts