I have a string like
string str = "[COUNT([Weight] > 10)] < 20 AND [COUNT([Height] < 10)] < 25";
And I want to get the value in square bracket. If I use expression Regex(@"\[.*?\]"
) => it returns
[COUNT([Weight] and [COUNT([Height]
but I want to get the value
[COUNT([Weight] > 10)] and [COUNT([Height] < 10)]
Could I do that? Please assist me.
Thanks!
You can try this regex:
REGEX DEMO