C# equivalent for strip_tags() in PHP

There’s a rather pretty way to use something like PHP strip_tags() function in C# just using regular expresion

using System.Text.RegularExpressions;
Regex regHtml = new System.Text.RegularExpressions.Regex("<[^>]*>");
string s = regHtml.Replace(InputString,"");


No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

MarkiMarta.com. Notes of web-specialist
Since 2009