rakun
rakun copied to clipboard
Make regex Safari and iOS compliant.
Describe the bug Some of your regex's are not safari and iOS compliant. When testing on an iOS device (iPhone 12 Pro on Chrome and Safari), I get a blank screen (when developing for rakun.app). This happens in production as well. Same thing happens when you use rakun.parse in a Safari browser.
SyntaxError: Invalid regular expression: invalid group specifier name That is the error I get when testing in a Safari browser (Macbook Air).
To Reproduce rakun.parse on any Safari browser and iOS device.
Expected behavior Regex should complete and retrieve the significant data.
Additional context Maybe relevant fixes for it. I haven't looked too deeply into all this as I don't know much of anything about regex.
- https://stackoverflow.com/questions/56926806/how-to-make-this-regex-safari-ios-compliant
- https://stackoverflow.com/questions/64410005/equivalent-regex-unsupported-lookbehind-assertion-ios-safari
I have no specifics as safari debugging is terrible, so sorry about that. I have no idea which regex functions they are, I just know something is broken.
Yeah I'm pretty sure it's linked to regexp lookbehind which are still not supported by safari... https://caniuse.com/js-regexp-lookbehind But it should be eventually supported one day I guess
From what I've check a lot of regexs used are using the look-behind feature, so it may be a bit hard to rewrite them to make it work 😕
This module was mostly intended to be used in a backend environement (with nodeJS) so I guess the fix would be to use a server instead that responds the requests, though it's a bit a shame since it seems to works locally for most browsers
Ah so it's not really gonna be fixed. Thats okay, I'll just write an error for anyone who visits on those devices. Kind of a shame but I understand.