T Tem Jun 5, 2008 #1 im looking for a regex that removes html special characters such at & followed by a word then ; Tem
im looking for a regex that removes html special characters such at & followed by a word then ; Tem
A Arne Vajhøj Jun 5, 2008 #2 Tem said: im looking for a regex that removes html special characters such at & followed by a word then ; Click to expand... Remove is easy. s = Regex.Replace(s, "&[^;]+;", ""); should do that. You can get the meaning of the entity inserted with: s = HttpUtility.HtmlDecode(s); Arne
Tem said: im looking for a regex that removes html special characters such at & followed by a word then ; Click to expand... Remove is easy. s = Regex.Replace(s, "&[^;]+;", ""); should do that. You can get the meaning of the entity inserted with: s = HttpUtility.HtmlDecode(s); Arne
T Tem Jun 5, 2008 #3 WOW this solves all my problems Arne Vajhøj said: Tem said: im looking for a regex that removes html special characters such at & followed by a word then ; Click to expand... Remove is easy. s = Regex.Replace(s, "&[^;]+;", ""); should do that. You can get the meaning of the entity inserted with: s = HttpUtility.HtmlDecode(s); Arne Click to expand...
WOW this solves all my problems Arne Vajhøj said: Tem said: im looking for a regex that removes html special characters such at & followed by a word then ; Click to expand... Remove is easy. s = Regex.Replace(s, "&[^;]+;", ""); should do that. You can get the meaning of the entity inserted with: s = HttpUtility.HtmlDecode(s); Arne Click to expand...
J jp2msft Jun 5, 2008 #4 Or you could put this in your page directive… validaterequest="true†Arne Vajhøj said: Tem said: im looking for a regex that removes html special characters such at & followed by a word then ; Click to expand... Remove is easy. s = Regex.Replace(s, "&[^;]+;", ""); should do that. You can get the meaning of the entity inserted with: s = HttpUtility.HtmlDecode(s); Arne Click to expand...
Or you could put this in your page directive… validaterequest="true†Arne Vajhøj said: Tem said: im looking for a regex that removes html special characters such at & followed by a word then ; Click to expand... Remove is easy. s = Regex.Replace(s, "&[^;]+;", ""); should do that. You can get the meaning of the entity inserted with: s = HttpUtility.HtmlDecode(s); Arne Click to expand...