I would like to ask which Regex i can use in order to splits the text string by <math xmlns='http://www.w3.org/1998/Math/MathML'>....</math>
the the result will be:
the code is:
var text = @"{(test&<math xmlns='http://www.w3.org/1998/Math/MathML'><apply><plus></plus><cn>1</cn><cn>2</cn></apply></math>)|(<math xmlns='http://www.w3.org/1998/Math/MathML'><apply><root></root><degree><ci>m</ci></degree><ci>m</ci></apply></math>&nnm)&<math xmlns='http://www.w3.org/1998/Math/MathML'><apply><power></power><cn>1</cn><cn>2</cn></apply></math>#<math xmlns='http://www.w3.org/1998/Math/MathML'><set><ci>l</ci></set></math>}";
string findTagString = "(<math.*?>)|(.+?(?=<math/>))";
Regex findTag = new Regex(findTagString);
List<string> textList = findTag.Split(text).ToList();
I have found a similar question at Using Regex to split XML string before and after match and i would like to ask for advice about the Regex expression
Thank you
Ori