Javascript regex negative lookbehind not working in firefox
问题 I need to modify the following javascript regex because the negative lookbehind in it throws an error in firefox: content = content.replace(/(?![^<]*>)(?:[\"])([^"]*?)(?<!=)(?:[\"])(?!>)/g, '„$1“'); Does anyone have an idea and can help me out? Thanks in advance! 回答1: Lookbehinds are only available in browsers supporting ECMA2018 standard, and that means, only the latest versions of Chrome can handle them. To support the majority of browsers, convert your pattern to only use lookaheads. The (