We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
复现方式:
let reg = /(?<=ap)ple/; console.log(reg.test("apple"), reg.test("people"));
在桌面浏览器中输出: true true
true true
在手机浏览器中直接报错。 SyntaxError: Invalid regular expression: invalid group specifier name
SyntaxError: Invalid regular expression: invalid group specifier name
Sorry, something went wrong.
可能出现问题的原因:
可以确定是某些浏览器不支持环视。
https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Browser_Compatibility
可以从中看到 lookbehind assertions ((?<= ) and (?<! )) 这一项,部分浏览器是不支持的。
lookbehind assertions ((?<= ) and (?<! ))
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: