Skip to content
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

Not supported in Safari 15.5 #27

Open
zhe-he opened this issue Nov 13, 2024 · 1 comment
Open

Not supported in Safari 15.5 #27

zhe-he opened this issue Nov 13, 2024 · 1 comment

Comments

@zhe-he
Copy link

zhe-he commented Nov 13, 2024

https://github.com/slevithan/regex/blob/ff7adf5a6f904b5c1c91a544efafb9c174e2baea/src/subroutines.js#L21C1-L28C1

I encountered a problem and found that Safari reported an error. Eventually, I pinpointed it to this location. In comparison to this, I wrote a simple regular expression. The image below shows the normal display and the error reported by Safari.

var capturingDelim = String.raw`\((?!\?)(?!(?<=\(\?\()DEFINE\))`;
new RegExp(String.raw`
| (?<capturingStart>${capturingDelim})
`.replace(/\s+/g, ''), 'gsu');
image image

I directly imported regex/dist/regex.min.js, and I still get the same error when I open it with Safari.

@slevithan
Copy link
Owner

Thanks for the report. Yes, this is a known issue. Old Safari is not supported, since Regex+ relies on lookbehind which Safari was years late to support compared to other browsers (not until Safari 16.4, released, released 2023-03-27).

I'll leave this open for now, until I investigate if there are things I can do to work around this.

@slevithan slevithan changed the title Bug: Named group matching not supported in Safari 15.5. Not supported in Safari 15.5 Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants