How to remove extra spaces using whitespace? [Resolved]

Posted by Gudevg under C# on 4/7/2012 | Points: 10 | Views : 1577 | Status : [Member] | Replies : 4
I used the below mention code to remove extra spaces occur in a document it ran successfully but extra spaces are not rearranged properly.

public static string ConvertWhitespacesToSingleSpaces(string strValue)
{
strValue = Regex.Replace(value, @"\s+", " ");
return strValue;
}

Any one please look into this to solve?


Regards,

Deepakkumar G.


Responses

Posted by: Gudevg on: 4/7/2012 [Member] Starter | Points: 25

Up
0
Down
Oops i did not notice that vel ji, Sorry

Deepakkumar G.

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 4/9/2012 [Member] Starter | Points: 25

Up
0
Down
U r right Sakthi....

Thanks & Regards
Hari

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gudevg on: 4/9/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

I was marked as answer for your response only.


Regards

Deepakkumar G.

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gudevg on: 4/9/2012 [Member] Starter | Points: 25

Up
0
Down
Mention not.



Regards,

Deepakkumar G.

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response