// Function
System.Text.RegularExpressions.Regex.Replace('string', 'regular exp', 'white-space');
// Exp
string Str="sdf asd asdf sdfas
asdf asdf asdf sdf
asdf asdf asdf";
string
cleanedString = System.Text.RegularExpressions.Regex.Replace(Str,
@"\s+", "
");
// Result
cleanedString ="sdf asd asdf sdfas asdf asdf asdf sdf asdf asdf asdf";
No comments:
Post a Comment