CodeItBetter Programming Another VB Programming Blog

How to Strip Numeric from a string

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'String Manipulation - How to Strip Numeric from a string
Option Explicit
 
Public Function StripNumeric(ByVal strExpression As String) As String
    Dim iLength As Integer, I As Integer
    Dim sResult As String, sChar As String
    iLength = Len(strExpression)
    For I = 1 To iLength
        sChar = Mid$(strExpression, I, 1)
        If Not sChar Like "[0-9]" Then
            sResult = sResult & sChar
        End If
    Next I
    StripNumeric = sResult
End Function

Related posts:

  1. How to Strip Non Alpha Numeric from a string
  2. How to Strip Alphabets from a string
  3. How to Strip special characters from a given String
  4. How to check if a string contains only Alpha Numeric Characters
  5. How to check if a string contains only Numeric Characters
  6. How to Strip/Remove Text from a given String
  7. How to Test if a character is Alpha Numeric.
  8. How to Remove all numeric characters from a string
  9. How to Strip the Null Terminator from a given String
  10. How to trim characters from the Beginning of a string

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.