public static string
stripIllegal(string str)
{
string
regex = String.Format("[{0}]", Regex.Escape(new string(Path.GetInvalidFileNameChars())));
return Regex.Replace(str,regex,"-");
}
in this case I exchange invalid char with -
No comments:
Post a Comment