How To: Extract numbers from string

VB.NET Shared Function ExtractNumbers( ByVal expr As String ) As String Return String.Join( Nothing, System.Text.RegularExpressions.Regex.Split( expr, "[^\d]" ) ) End Function C# static string ExtractNumbers( string expr ) { return string.Join Read More...

Read the complete post at http://weblogs.asp.net/sushilasb/archive/2006/08/03/How-to-extract-numbers-from-string.aspx