At the moment /**/some.* doesn't match /some.txt due to the fact that the / is matching, and then the directory wildcard ** is matching from position 1 with subtokens that match /some. against text from position 1 which is some.txt. /some. doesn't match some.txt.
This all boils down to the fact that token needs to also know if it has a trailing / so that I can omit a / token for the trailing slash in its place. That way rather than the glob `//` being tokenised into
/ token
** token
/ token
it can be tokenised into just:
/ token
** token (with information to say the token has a trailing / character.
This will result in the trailing slash in / being omitted as token, so then //some.* will match /some.txt.
/*/some. will not however match some.txt as the first / still expects to match as it is a path separator token. I think this is ok, as to match "some.txt" in any directory you could use **/some.txt and then this wont require a leading slash.
.
At the moment
/**/some.*
doesn't match/some.txt
due to the fact that the / is matching, and then the directory wildcard**
is matching from position 1 with subtokens that match /some. against text from position 1 which is some.txt. /some. doesn't match some.txt.This all boils down to the fact that token needs to also know if it has a trailing / so that I can omit a / token for the trailing slash in its place. That way rather than the glob `//` being tokenised into
**
tokenit can be tokenised into just:
**
token (with information to say the token has a trailing / character.This will result in the trailing slash in / being omitted as token, so then //some.* will match /some.txt.
/*/some. will not however match
some.txt
as the first / still expects to match as it is a path separator token. I think this is ok, as to match "some.txt" in any directory you could use **/some.txt and then this wont require a leading slash. .