glob-to-regexp icon indicating copy to clipboard operation
glob-to-regexp copied to clipboard

Curly braces are not handled

Open stevelacey opened this issue 5 years ago • 0 comments

Curly braces are not handled

> globToRegExp('./resources/lang/{en,fr}/*.json')

Expected:

/^\.\/resources\/lang\/(en|fr)\/.*\.json$/

or (minimatch produces this):

/^(?:\.\/resources\/lang\/en\.json|\.\/resources\/lang\/fr\.json)$/

Actual:

/^\.\/resources\/lang\/\{en\,fr\}\/.*\.json$/

stevelacey avatar Jan 13 '20 04:01 stevelacey