Strip HTML Tags From a String
9
Strip HTML Tags From a String
string strippedString = Regex.Replace(htmlString,@"<(.|\n)*?>",string.Empty);
//this will strip anything found in HTML tags.
//(.|\n) -- Finds any character including the new line character
// *? -- 0 or more occurences and the match will stop at the first occuring ">" it sees
//this will strip anything found in HTML tags.
//(.|\n) -- Finds any character including the new line character
// *? -- 0 or more occurences and the match will stop at the first occuring ">" it sees





There are currently no comments for this snippet.