Public Function GetNumber(ByVal Str As String) As String Dim Search As String Dim ResultNumber As New StringBuilder For i As Integer = 1 To Str.Length Dim find As Boolean Search = Mid(Str, i, 1) find = Search Like "[0-9]" If find = True Then ResultNumber.Append(Search) End If Next i Return ResultNumber.ToString End Function