I have a regex: /(?/g
. Works fine in browser console if I do \"(<
As an answer as well (more space):
Unless node.js
uses it's own regex engine and not the JavaScript
one, lookbehinds are not supported in JS
, thus (? cannot work. To somewhat mimic this feature from other programming languages, have a look at Flagrant Badassery or use additional packages like node-re2 or node-perl-regex.
As for the differences between Browsers, Chrome
does support lookbehinds.