So I made a vbs script for SecureCRT but it is not working. The script should look inside a text and check all interfaces then loop through them by issuing a command for each interface. the error I receive is in code line (Set matches = re.Execute(allthetext)) it is saying (Unexpected quantifier).
I hope to find a solotion
$language = "VBScript"
$interface = "1.0"
crt.Screen.Synchronous = True
Sub Main ()
allthetext = "ge-10/1/2 but not ae22 and as well ge-1/0/0 in addtion xe-0/0/0:2, lets see"
Set re = New RegExp
re.Pattern = "\b{2}-\d{1,3}-\d{1,3}-\d{1,3}:\d|\b{2}-\d{1,3}-\d{1,3}-\d{1,3}"
Set matches = re.Execute(allthetext)
For Each match In matches
theInterface = match.SubMatches(0)
crt.Screen.Send "show interfaces " & theInterface & "| match ""down"" " & chr(13)
Next
End Sub