Wednesday, February 20, 2008

Remove Spaces From String

using System.Text.RegularExpressions;

private string RemoveSpaces(string str)
{
string result = "";
Regex regulEx = new Regex(@"[\s]+");
result = regulEx.Replace(str," ");
return result;
}

2 comments:

Anonymous said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Fragmentadora de Papel, I hope you enjoy. The address is http://fragmentadora-de-papel.blogspot.com. A hug.

Anonymous said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Celulite, I hope you enjoy. The address is http://eliminando-a-celulite.blogspot.com. A hug.