c# - Aggregate regex replace -


So it's purely curiosity ...

I have a set of tags :

& lt; Tag & gt; & Lt; Sub & gt; & Lt; / Sub & gt; & Lt; Sub & gt; B & lt; / Sub & gt; & Lt; Sub & gt; C & lt; / Sub & gt; & Lt; / Tags & gt; & Lt; Tag & gt; & Lt; Sub & gt; 1 & lt; / Sub & gt; & Lt; Sub & gt; 2 & lt; / Sub & gt; & Lt; Sub & gt; 3 & lt; / Sub & gt; & Lt; / Tags & gt;

In any single Regex.Replace command, all & lt; Sub & gt; the content of the tag & lt; Tag & gt; a & lt; Sub & gt; .

Like:

  & lt; Tag & gt; & Lt; Sub & gt; ABC & lt; / Sub & gt; & Lt; / Tags & gt; & Lt; Tag & gt; & Lt; Sub & gt; 123 & lt; / Sub & gt; & Lt; / Tags & gt;  

My guess is not, but I thought I wanted to give it a shot.

The theoretical tag is it always clear? If so, then & lt; / Sub & gt; \ S + & lt; Sub & gt; Nothing will happen with the place of .


Comments

Popular posts from this blog

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -