SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Code snippet - 0007

This post has 0 Replies | 0 Followers

Top 50 Contributor
Posts 82
ericwsw Posted: 04-21-2005 8:37 AM

Removing Duplicate Whitespace in a String

  Dim a As String = " 1 2   3  4  "
  a = System.Text.RegularExpressions.Regex.Replace(a, "\s+", " ").Trim
' a ="1 2 3 4"

Page 1 of 1 (1 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems