This method uses a byte array which may provide a performance advantage.
VB Code:
Function ExtractNumbers(s As String) As String 'Nucleus Dim ba() As Byte,v As byte,i& ba = s For i = 0 To UBound(ba) step 2 v = ba(i) If v > 47 And v < 58 Then ExtractNumbers = ExtractNumbers & Chr$(v) Next i End Function


Reply With Quote