diff --git a/index.js b/index.js index 03bd090..f2e0d2b 100644 --- a/index.js +++ b/index.js @@ -107,11 +107,11 @@ module.exports = function (glob, opts) { if (isGlobstar) { // it's a globstar, so match zero or more path segments - reStr += "(?:[^/]*(?:\/|$))*"; + reStr += "((?:[^/]*(?:\/|$))*)"; i++; // move over the "/" } else { // it's not a globstar, so only match one path segment - reStr += "[^/]*"; + reStr += "([^/]*)"; } } break;