This is because Safari browser does not support regular expression zero assertion in two// formats:<= , ?<!
Solution:
Use constructor instead of// format
let reg = /ab?<=cd/
Change to
let reg = new RegExp('ab(?<=cd)')
Read More:
- [Solved] Vue3 Configuration routing error: Catch all routes (“*“) must now be defined using a param with a custom regexp.
- JS to determine whether the string contains a character
- JavaScript Common Errors List (Reasons & Solutions)
- [Solved] Syntax Error: Error: No ESLint configuration found & TypeError: eslint.CLIEngine is not a constructor
- How to Solve Vscode save Vue file eslint error
- TypeScript error TS2345: Argument of type ‘String ‘is not assignable to parameter of type ‘string’
- [Solved] layui table org.thymeleaf.exceptions.TemplateInputException: An error happened during template…
- Application of call, apply and bind methods
- [Solved] Vue Element Date plug-in reports an error in form validation
- Summary of jQuery autocomplete plug-in
- [Vue warn]: Error in render: “TypeError: Cannot read properties of undefined
- [Solved] Prittier format code error: JSON Error in…
- [Solved] Vue Project startup error: no eslint configuration found
- vue Error: Uncaught SyntaxError: Invalid shorthand property initializer
- [Solved] react Chrome Browser Error: Uncaught TypeError: Cannot read properties of undefined (reading ‘forEach‘)
- React error boundary (What You Should Know & How to Solve)
- The solution of calling$. Ajax successfully but the success method does not respond
- [Solved] Vue2.0 Error: Syntax Error: TypeError: eslint.CLIEngine is not a constructor
- [Solved] vite package Error: globalThis is not defined
- TypeError: r.indexOf is not a function TypeError: r.indexOf is not a function