/// <summary>
/// Strips tags
/// </summary>
/// <param name="text">Text</param>
/// <returns>Formatted text</returns>
public static string StripTags(string text)
{
if (String.IsNullOrEmpty(text))
return string.Empty;
text = Regex.Replace(text, @"(>)(\r|\n)*(<)", "><");
text = Regex.Replace(text, "(<[^>]*>)([^<]*)", "$2");
text = Regex.Replace(text, "
(&#x?[0-9]{2,4};|"|&| |<|>
|€|©|®|‰|‡|†
|‹|›|„|”|“
|‚|’|‘|—|–
|‏|‎|‍|‌| | 
| |˜|ˆ|Ÿ|š|Š)", "@");
return text;
}
Why the html special chars are replaced with an @ ? (last regex.replace line)
Thanks for any help.
Ps
regex pattern has been word wrapped for readability.