Utility function that removes all non-numeric characters from a string and returns just the numbers. This is used when storing SSN's, ZIP Codes, etc.
Syntax
'Declaration
Public Overloads Shared Function StripNonNumerics( _
ByVal As String, _
ByVal As String _
) As String
'Usage
Dim strIN As String
Dim strExcept As String
Dim value As String
value = Utils.StripNonNumerics(strIN, strExcept)
Parameters
- strIN
- String that may contain non-numeric characters
- strExcept
- Allow these characters to be included even if they're non-numeric
Return Value
String containing only the numeric characters from the input string
See Also