I want to give the possibility to match string with wildcard *.
*
Example
$mystring = \'dir/folder1/file\'; $pattern = \'dir/*/file\'; string
.+?
Causes non-greedy matching for all characters. This is NOT equal to "*" becuase it will not match the empty string.
The following pattern will match the empty string too:
.*?
so...
stringMatchWithWildcard ("hello", "hel*lo"); // will give true