Solved Query to Trim

Number11

Member
Local time
Today, 04:10
Joined
Jan 29, 2020
Messages
623
Hi,

I need to trim all expect the numbers

03: SET ACTION
04: SET CALL BACK
05: CLOSE

just need
03
04
05

any ideas please
 
this did the job

Left([ACTION],2)
 
you can also create a function, if the "number" part has variable length, ie 01, 02, 101, 10001:
Code:
Public Function fncOnlyNumber(ByVal pString As String) As String
    With CreateObject("vbscript.regexp")
        .ignorecase = True
        .Global = True
        .pattern = "([^0-9]+)"
        
        pString = .Replace(pString, "")
    End With
    fncOnlyNumber = pString
End Function
 

Users who are viewing this thread

Back
Top Bottom