segment-boneyard / nightmare

A high-level browser automation library.
https://open.segment.com
19.54k stars 1.08k forks source link

JavaScript Lookbehind Assertions Not Yet Supported #1583

Open 1toddlewis opened 4 years ago

1toddlewis commented 4 years ago

SyntaxError: Invalid regular expression: /(?<=data-userid=")\d+(?=")/: Invalid group

They're part of the current JS spec and supported in both Chrome and Node: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Browser_compatibility

I may have to look into Puppeteer until they're supported in Nightmare. Consider this a feature request!