Skip to content

Instantly share code, notes, and snippets.

@cleydson
Created July 12, 2010 19:38
Show Gist options
  • Select an option

  • Save cleydson/472956 to your computer and use it in GitHub Desktop.

Select an option

Save cleydson/472956 to your computer and use it in GitHub Desktop.
Public Shared Function GetNumbers(ByVal texto As String) As String
Try
Return System.Text.RegularExpressions.Regex.Replace(texto, "[^\d]", String.Empty)
Catch ex As Exception
Throw
End Try
End Function
@cleydson

Copy link
Copy Markdown
Author

Return just the numbers of a string. VB.Net code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment