It seems safari has some regex features that are not well supported (lookbehind) even in it's latest version and throws some warnings:
register.js:298 SyntaxError: Invalid regular expression: invalid group specifier
Is there a way to detect, lint or transform those kind of regex automatically with webpack or any other tool at compile time, because those kind of errors tend to slip through tests?
In my case this is the regex causing an error
/(?<!\.|^)\.(?!\.+|$)/
It should match a dot in the middle of the string but not match a succession of dots, I'm trying to get a good equivalent for this regex but I am getting nowhere so far
const tests = [
'test.123.test',
'.test',
'test.',
'test.3..test',
];
//Expected
tests.forEach((test) => console.log(test.split(/(?<!\.|^)\.(?!\.+|$)/)));
//Actual
tests.forEach((test) => console.log(test.match(/^(([^.]*?)(?:\.)([^.]*?))*$/)));