I split the line in my code as follows:
var lines = myString == null
? new string[] { }
: myString.Split(new[] { "\n", "<br />" }, StringSplitOptions.RemoveEmptyEntries);
The problem is that sometimes the text looks like this:
sdjkgjkdgjk<br />asdfsdg
And in this case my code works. however, in other cases, the text is as follows:
sdjkgjkdgjk<br style="someAttribute: someProperty;"/>asdfsdg
And in this case, I do not get the result that I want. how to split this line into the whole br tag along with all its attributes?
source
share