Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hey out there!
I have one question for which I haven't found an answer in the web.
I use the following code to remove whitespaces from my string:
C#
Regex.Replace(Text, @"\s+", string.Empty)

But I haven't found a list which characters are recognized by \s in .Net
I've read that the recognized characters differ from platform to platform, so probably someone can point me in the right direction?

Thanks for you help!
Posted
Updated 15-Apr-14 4:01am
v2
Comments
[no name] 15-Apr-14 10:11am    
http://msdn.microsoft.com/en-us/library/aa664665(v=vs.71).aspx
NeonMika 15-Apr-14 10:22am    
Thank you for the link!

\s matches whitespace (short for [\f\n\r\t\v\u00A0\u2028\u2029]).


Please take a look at this : Regular Expressions patterns
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900