I have code that takes this string and parses it into an array of characters:
var textArray = Regex.Replace(text, @"</?span( [^>]*|/)?>",
String.Empty).Trim().ToCharArray();
<span>そ</span><span>れ</span><span>に</span><span>も</span>拘<span>わ</span><span>ら</span>もも<span>ず</span>
But now I need to do something different and I am not sure how to go about this. What I need is to parse a string like this into an array like this:
そ
れ
に
も
拘
わ
ら
もも
ず
Where anything in between <span>
and </span>
is an element in the array and also anything in between </span>
and <span>
.
Would appreciate any advice anyone could offer on how I can use Regex to do this: