I am trying to using regex replace in C# although I am having some issues getting the pattern to align correctly. What I am looking to do is replace certain combinations as per the first 2 groups but not if it matches the pattern of the 3rd group. What I have so far is
var pattern = @"(,)|(\[\{)|(^:\[[*]])";
string NewLineValue = Regex.Replace(LineValue, pattern,Environment.NewLine);
Essentially I want to replace all comma's or [{ combinations in a string but not if the comma appears within [[]] characters (e.g [[1234,5678]])
Any help is much appreciated...