Monday, June 13, 2011

Replace space with another string


string str="good morning";
Regex rgx = new Regex("\\s+");
str = rgx.Replace(str, "%20");

No comments:

Post a Comment