I want to take the text and some special characters between the xml tags..
My input file contains:
<line>public static void main(String[] args)</line>
<line>{</line>
<line> <>double <inline>result</inline> = Math.pow(2, 3);</line>
<line> . . .</line>
<line> </line> 'white space also comes
<line>}</line>
now i want the Regex to take text and the special characters between the tags <line>,<inline>..
Parsing it as an XML will fail because of the <> before “double”. I’d not use Regex for this either, but simple String.Replace will perform better or StringBuilder would be even better.
This works fine for me:
UPDATE:
with this it should work in .net 2.0 too: