Example:
Regex for MAC Address:
([A-Za-z0-9]{2})([A-Za-z0-9]{2}).([A-Za-z0-9]{2})([A-Za-z0-9]{2}).([A-Za-z0-9]{2})([A-Za-z0-9]{2})
Regex Replacement:
\1-\2-\3-\4-\5-\6
To change MAC Address format from f8b1.56e0.0e07 to f8-b1-56-e0-0e-07.
2) I'm trying to adapt the Packet Loss Script (Ping Example) to check for computers license status, specially to find out if they are activated but I'm lost with the following error message: Invalid procedure call or argument.
Script:
'Create process object and execute
Set proc = Internal.CreateObject("process")
proc.execute("cscript.exe " & "//nologo " & "c:\windows\system32\slmgr.vbs " & Input.Column("Host name") & " -xpr")
'Check cscript exit code
If proc.ExitCode = 0 Then
'Setup a regex object
Set objRegex = New RegExp
objRegex.IgnoreCase = True
objRegex.Multiline = True
objRegex.Global = True
'Regex to look for a specific string
objRegex.Pattern = "activated"
'Traverse output lines
For Each line in proc.output
Set matches = objRegex.Execute(line)
'Print regex match
For Each match in matches
Output.Write match.SubMatches(0)
Next
Next
Else
Output.Write "Exit code " & proc.ExitCode
End If
Thanks!!