Skip to content

Instantly share code, notes, and snippets.

@satokjp
Created September 14, 2013 18:35
Show Gist options
  • Save satokjp/6564399 to your computer and use it in GitHub Desktop.
Save satokjp/6564399 to your computer and use it in GitHub Desktop.
Dim strTmp,regTmp
strTmp = "/a/bb/ccc/file.txt"
Set regTmp = New RegExp
regTmp.Pattern = "(^\/.*\/)([^\/]+\.\w+$)"
Set matches = regTmp.Execute(strTmp)
IF matches.Count > 0 Then
WScript.Echo matches.Item(0).SubMatches.Item(0)
WScript.Echo matches.Item(0).SubMatches.Item(1)
End IF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment