Parse full string in Html using C#

mirain

New Member
I have the following two examples of html-\[code\]<a href="http://foo.com">User</a>: <a style="color:#333" href="http://foo.com/word"></a> blue elephant &middot;<a href="http://foo.com">User</a>: <a style="color:#333" href="http://foo.com/word">@<b>word</b></a> blue elephant &middot;\[/code\]I am trying to parse this using C# to put into a csv file and it is working to an extent however, when the html contains the '@' symbol in it, it will either leave the csv cell blank or not include the word with '@' before it. The main part I am trying to get is \[code\]@word blue elephant\[/code\] however this is bringing back a blank cell, whereas the first html example brings back \[code\]blue elephant\[/code\] as desired.I am using the following technique to do this-\[code\]string[] comm = System.Text.RegularExpressions.Regex.Split(content[1], "<a");\[/code\]How can I alter this to work for the second html example?
 
Top