Wildcard string matching

后端 未结 9 1549
醉话见心
醉话见心 2021-01-02 01:54

What is the most efficient wildcard string matching algorithm? I am asking only about an idea, it is not necessary to provide actual code.

I\'m thinking that such al

9条回答
  •  情书的邮戳
    2021-01-02 02:26

    Depending on the wildcard "language", I'd (probably) simply write a wildcard->regexp compiler and use the (commonly provided) regexp engine to do the actual matching. It's a bit lazy, but unless there's an actual performance problem doing it that way, it'd be fast enough.

提交回复
热议问题