There are several ways, including using a regular expression. You can also
do this:
Dim full As String = "jhg345gvbjk36hg53j5j3hg5j3"
Dim validChars As String = "0123456789"
Dim numbers As String
Dim allChars() As Char = full.ToCharArray
For Each ch As Char In allChars
If validChars.IndexOf(ch) <> -1 Then
numbers &= ch
End If
Next
MessageBox.Show(numbers)
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Communities -
http://community.integratedsolutions.dk
"Nikolay Petrov" <jo******@mail.bg> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
How to filter out only digits from a string?
i.e. fgfdg435fdg7dgf5:df,54 => 4357554
Thanks