Skip to content

Glob **/!(*-dbg).@(js) is wrongly translated into RegExp and thus DOES match -dbg.js files #93

@kristian

Description

@kristian

The Glob:

**/!(*-dbg).@(js)

Which should match any .js files that do not end with -dbg is wrongly translated to:

^(?:(?:^|[\\/]|(?:(?:(?!(?:^|[\\/])\.{1,2}(?:[\\/]|$)).)*?)[\\/])(?:(?!(?:[^\\/]*?-dbg).@(js))[^\\/]*?)\.(js))$

Please note how for the negative backreference, the glob pattern .@(js) is literally taking into the regex and is not translated into a regexp / excapted itself? Expected RegExp would have been:

^(?:(?:^|[\\/]|(?:(?:(?!(?:^|[\\/])\.{1,2}(?:[\\/]|$)).)*?)[\\/])(?:(?!(?:[^\\/]*?-dbg)\.(js))[^\\/]*?)\.(js))$

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions