string sourceStr = @"Test, Hsr 156-1, "; //Specify all the SP Characters you want to removestring rgPattern = @"['*,]"; Regex oRegex = new Regex(rgPattern); //string rgPattern = @"['\\\/:\*\?""<>,]"; MessageBox.Show(oRegex.Replace(sourceStr, ""));
Hope this helps
Monday, July 13, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment