additional fix for wildcards

This commit is contained in:
skilion 2015-09-22 11:16:06 +02:00
parent 21993b36ee
commit da2cfbde9c

View file

@ -43,7 +43,7 @@ Regex!char wild2regex(const(char)[] pattern)
{
string str;
str.reserve(pattern.length + 2);
str ~= "(^|/)";
str ~= "/";
foreach (c; pattern) {
switch (c) {
case '*':
@ -56,7 +56,7 @@ Regex!char wild2regex(const(char)[] pattern)
str ~= "[^/]";
break;
case '|':
str ~= "$|(^|/)";
str ~= "$|/";
break;
default:
str ~= c;