So this is purely a question of curiosity...
Say I have a set of tags:
<tag>
<sub>A</sub>
<sub>B</sub>
<sub>C</sub>
</tag>
<tag>
<sub>1</sub>
<sub>2</sub>
<sub>3</sub>
</tag>
Is it possible to, in a single Regex.Replace
command, aggregate the contents of all <sub>
tags within a <tag>
into one <sub>
.
Like so:
<tag><sub>ABC</sub></tag>
<tag><sub>123</sub></tag>
My guess is no, but I figured I'd give it a shot.