I have content:encoded text like below from an rss:
<content:encoded><![CDATA[<P><B>Wednesday, September 26, 2012</B></P>It is Apple.<P>Shops are closed.<br />Parking is not allowed here. Go left and park.<br />All theatres are opened.<br /></P><P><B>Thursday, September 27, 2012</B></P><P>Shops are open.<br />Parking is not allowed here. Go left and park.<br />All theatres are opened.<br /></P>]]></content:encoded>
Using the below method I am able to extract the text from the HTML:
public static string StripHTML(this string htmlText)
{
var reg = new Regex("<[^>]+>", RegexOptions.IgnoreCase);
return HttpUtility.HtmlDecode(reg.Replace(htmlText, string.Empty));
}
But I want the text within <b></b>
to be inserted in a dateArray[] and text within <p></p>
to be inserted in descriptionArray[] so the I can display like below:
tHANKS iN aDVANCE.