How to match a string against a set of wildcard strings efficiently?

后端 未结 2 1755
慢半拍i
慢半拍i 2021-01-14 16:43

I am looking for a solution to match a single string against a set of wildcard strings. For example

>>> match(\"ab\", [\"a*\", \"b*\", \"*\", \"c\",         


        
2条回答
  •  逝去的感伤
    2021-01-14 17:25

    Seems like Aho-Corasick algorithm would work. esmre seem to do what I'm looking for. I got this information from this question.

提交回复
热议问题