I have a string like this [test]][test][test]
I would like with a regex to obtain a collection of elements where each element will be a value between the brackets [] :
test
test
test
With this code:
var pattern = @"\[(.*?)\]";
var results = Regex.Matches("[test]][test][test]", pattern);
I managed to get the values but they include the brackets [] :
[test]
[test]
[test]