1
$\begingroup$

I'm trying to find efficient algorithm for checking if string with wildcards contains given substring.

The parts of the string are separated with a "." character.

So for example I have

ab.cd.*.efg

And I want to check for given strings, if they are substrings of string above, for example to match with those:

ab
b.c
cd.qq <- "qq" is replacement for wildcard
d.qwe.ef <- "qwe" is replacement for wildcard

What is the best algorithm to use?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.