I have string which clook like this:
I need a method to split this string and remove the square bracket. With the above example this would produce two strings
The approach would have to be able to handle different lengths
I’ve tried using a regex snippet:
string pattern = @"(?<=\[)(.*?)(?=\])";
Match output = Regex.Match("str_value", pattern, RegexOptions.Singleline | RegexOptions.IgnoreCase);
But this just extracts the contents of the square brackets?
Any suggestions appreciated,