var pattern = @"*\**"
var glob = Globbing.Glob.Parse(pattern);
var match = glob.IsMatch("foo");
This is because the \** is expecting t o start matching on a \ or /. So for example, it will currently match this:
var match = glob.IsMatch("foo\");
However, I should cover the case where we want to match foo as well as foo\ or foo\var. Basically we want to match any path starting with foo whether it has zero or many path seperator's following foo. So foo\** should match foo as well as foo\ and foo\bar\baz :-)
Currently this match fails:
This is because the
\**
is expecting t o start matching on a\
or/
. So for example, it will currently match this:However, I should cover the case where we want to match
foo
as well asfoo\
orfoo\var
. Basically we want to match any path starting withfoo
whether it has zero or many path seperator's followingfoo
. Sofoo\**
should matchfoo
as well asfoo\
andfoo\bar\baz
:-)