匹配“[[”和“]]”之间文本的正则表达式是什么?

What is the regex expression for matching the text between "[[" and "]]"?

匹配“[[”和“]]”之间文本的正则表达式是什么?

例如:

[[* repeat i by "4" until [[%arrAccountDetails.Count%]] *]]

[[*endrepeat*]]

[[* if expr=[[%event.RemainingAccountCount%]] != "" *]]

[[*endif*]]

我正在“[[”和“]]”之间编写自定义代码,需要将其视为服务器端代码。

感谢和问候 文卡特什 G

做:

\[\[([^]]*)\]\]

现在唯一捕获的组有你想要的。

Demo