public static string CleanForUrl(string text)
{
return Regex.Replace(text, @"[^a-z^A-Z^0-9^-]", "-");
}
Friday, October 17, 2008
Cleaning a string using a regular expression ready for placing in a URL
Subscribe to:
Post Comments (Atom)
public static string CleanForUrl(string text)
{
return Regex.Replace(text, @"[^a-z^A-Z^0-9^-]", "-");
}
No comments:
Post a Comment