Check this -
We recently had a quiz on our blog and tackled a similar problem where we got brilliant answers in the comments section. Check this blog post Retrieve numbers from dynamic string using VB Script
Code:
Dim s : s = "3646456/3"
Set re = New RegExp 'Create Regular expression object
re.Pattern = "^\d+" 'Matches if a string starts with a digit
Set matches = re.Execute(s) 'Collection
If matches.Count <> 0 Then
msgbox matches(0).Value 'Output the first value if it exists
else
msgbox "The input string " & s & " doesn't start with a digit"
End If
We recently had a quiz on our blog and tackled a similar problem where we got brilliant answers in the comments section. Check this blog post Retrieve numbers from dynamic string using VB Script