Error details:
Found that Google and 360 browsers work fine, but on Firefox it reports an error: SyntaxError: invalid regexp group
The reason for the error: my regularization is useful – —?& lt=
eg.(?<=(?:TianYe))[\u4e00-\u9fa5]{2} ------ Regular match for 2 Chinese characters starting with (TianYe) and ending with (TianYe).
// (? <=(? :TianYe)) ------ matches strings starting with (TianYe) and is not captured (not stored) in the group;
// [\u4e00-\u9fa5] ------ matches Chinese characters;
// {2} ------- matches 2 characters.
Root cause:
Firefox does not support prior assertion(lookahead)
Solutions:
Match it first, and then slice(0,2) it later.
Read More:
- [Solved] SyntaxError: Invalid regular expression: invalid group specifier name
- How to Solve Error: “syntax error near unexpected token `newline’”
- How to Solve Uncaught Error: Syntax error, unrecognized expression:#
- How to Solve pod Error: “Authentication token is invalid or unverified. Either verify it with the email that…”
- How to Solve org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) Error
- Vscode configures eslint to solve terminal syntax error
- [Solved] Jquery addclass reports an error under Firefox
- [Solved] Python2 Install tensorflow Error: class DescriptorBase(metaclass=DescriptorMetaclass), SyntaxError: invalid syntax
- [Solved] pagehelper Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 1’
- How to Solve Jquery 1.9 $.browser Error
- How to Solve Sqlyog error 2058
- How to Solve Hyperf Failed to Start Error After Aliyun ACM Installed
- How to Solve elasticsearch-7.15.1 operation errors
- How to Solve elasticsearch root user start Error
- How to Solve Webpack CacheGroups Error
- How to Solve Starrocks Various Error
- How to Solve golang test Error: # command-line-arguments [command-line-arguments.test]
- How to Solve Arxiv Upload with PDFLatex Error
- How to Solve error C2039: “to_ String “: not a member of” STD “