Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid regular expression: /^(([^\\]*)|\.$/: Unterminated group #48

Open
mrmlnc opened this issue Jun 11, 2019 · 1 comment
Open

Invalid regular expression: /^(([^\\]*)|\.$/: Unterminated group #48

mrmlnc opened this issue Jun 11, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@mrmlnc
Copy link
Contributor

mrmlnc commented Jun 11, 2019

Environment

  • Windows 10
  • Node.js 12.3.1
  • tiny-glob 0.2.6
  • globrex 0.1.2

Actual behaviour

const tg = require('tiny-glob/sync');

const entries = tg('{*,./package.json,package.json}');

console.dir(entries, { colors: true });
D:\OpenSource\fast-glob\node_modules\globrex\index.js:42
                    path.segments.push(new RegExp(segment, flags));
                                       ^

SyntaxError: Invalid regular expression: /^(([^\\]*)|\.$/: Unterminated group
    at new RegExp (<anonymous>)
    at add (D:\OpenSource\fast-glob\node_modules\globrex\index.js:42:40)
    at globrex (D:\OpenSource\fast-glob\node_modules\globrex\index.js:62:13)
    at module.exports (D:\OpenSource\fast-glob\node_modules\tiny-glob\sync.js:75:20)
    at Object.<anonymous> (D:\OpenSource\fast-glob\test.js:3:17)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)

Expected behaviour

I see entries.

@terkelg terkelg added the bug Something isn't working label Jun 19, 2019
@terkelg
Copy link
Owner

terkelg commented Apr 21, 2020

Thank you! I'm working on a fix for this in the next release.
Are you sure path separators are valid characters inside brace expansions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants