@RHL: No deberías declarar RtlMoveMemory() por el ordinal... es probable que no funcione en todas las versiones de W$.
Mi código:
Private Static Sub kGetNums(ByRef s As String)
Dim bv(0) As Byte
Dim pbv As Long
Dim rps As Long
Dim i As Long
Dim b As Byte
Dim w As Long
If pbv = 0 Then pbv = VarPtr(bv(0))
rps = StrPtr(s) - pbv
w = 0
For i = 0 To LenB(s) Step 10
b = bv(rps + i + 0)
If b >= &H30 Then
If b <= &H39 Then
bv(rps + w) = b
w = w + 2
End If
End If
b = bv(rps + i + 2)
If b >= &H30 Then
If b <= &H39 Then
bv(rps + w) = b
w = w + 2
End If
End If
b = bv(rps + i + 4)
If b >= &H30 Then
If b <= &H39 Then
bv(rps + w) = b
w = w + 2
End If
End If
b = bv(rps + i + 6)
If b >= &H30 Then
If b <= &H39 Then
bv(rps + w) = b
w = w + 2
End If
End If
b = bv(rps + i + 8)
If b >= &H30 Then
If b <= &H39 Then
bv(rps + w) = b
w = w + 2
End If
End If
Next i
bv(rps + w) = 0
End Sub
dim x as string
x = "1e2e3a4b"
call kGetNums(x)
msgbox x
HAY QUE DESACTIVAR LA COMPROBACIÓN DE TAMAÑO DEL BUFFER!!! Y probar compilado (of course!)!!!
He arriesgado un poco con el unwinding del bucle... pero ya veremos los resultados

Sería conveniente también que para hacer las pruebas de velocidad además de hacerlo compilado hacerlo sin comprobación de buffers y comprobación de overflow!!
PD: He ganado a "tu" mov
