salve sto cercando di "realizzare" una regexp
per poter eliminare dei tag html da un buffer di testo html
(che rappresenta una pagina html base che si puà trovare in qualsiasi sito)
sto facendo una cosa del genere
public static string strip_tagsv2(string stringa,string tagdatogliere)
{
stringa = stringa.Trim();
stringa = stringa.Replace(" ", "");
string result = "";
String[] tags = tagdatogliere.Split('#');
foreach (string val in tags)
{
if (stringa.Length > 0)
{
Regex exp = new Regex("<"+val+"^>]+>", RegexOptions.IgnoreCase);
result = exp.Replace(stringa, "");
result = result.Replace("\r", "");
result = result.Replace("\n", "");
result = result.Trim();
}
stringa = result;
}
return stringa;
}
Solo che non sortisce nessun effetto al testo