-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
SyntaxError: invalid regexp group (in Firefox) #24
Comments
This module mainly targets Node.js, not the browser. It's up to you to transpile it with Babel if you want to use it in the browser. You can find a more detailed explanation here: sindresorhus/ama#446 If you use Webpack, check out |
hi @sindresorhus, this is not transpiling issue. const word = '[a-fA-F\\d:]';
const b = `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))`;
new RegExp(b);
> SyntaxError: invalid regexp group I assume the bug related to different js engines used in Chrome/Firefox and particularly how they handle regexp. |
Lookbehind regex syntax (which this module uses) is not supported in Firefox. This module targets Node.js and V8, so this is not a concern for me. |
Now that is clear, thanks. |
https://codepen.io/anon/pen/MBEPWv
In Chrome 66 works:
In Firefox 61 does not:
Seems to be related with: https://bugzilla.mozilla.org/show_bug.cgi?id=1425763
The text was updated successfully, but these errors were encountered: