Venkatesh G Venkatesh G - 1 month ago 7
C# Question

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

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

for eg:

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

[[*endrepeat*]]

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

[[*endif*]]


I am writing a custom code between "[[" and "]]" which need to treat as server side code.

Thanks and Regards
Venkatesh G

Answer

Do:

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

now the only captured group has what you want.

Demo