Javascript/RegExp: Lookbehind Assertion is causing a “Invalid group” error

前端 未结 3 1566
栀梦
栀梦 2020-12-10 05:54

I\'m doing a simple Lookbehind Assertion to get a segment of the URL (example below) but instead of getting the match I get the following error:

Uncaught Syn         


        
3条回答
  •  星月不相逢
    2020-12-10 06:25

    I believe JavaScript does not support positive lookbehind. You will have to do something more like this:

    
    

提交回复
热议问题