Regex only capturing last instance of capture group in match

后端 未结 2 530
轮回少年
轮回少年 2020-12-06 19:49

I have the following regular expression in two different languages that produces the same odd results (javaScript and Flash). What I want to know is not how to fix it, but

2条回答
  •  自闭症患者
    2020-12-06 20:30

    Try including the * quantifier inside the capture group, like this:

    \[((?:\\{2}|\\\]|[^\]])*)\]
    

提交回复
热议问题