删除字符串中指定的内容
Dim pathStr, newPathStr pathStr = "c:windows;%My% ool;e: est;%Tg%ff;d:mm" set regEx = New RegExp regEx.Pattern = ";%[a-zA-Z]+%(\[a-zA-Z]+)*" regEx.Global = True newPathStr = regEx.Replace(pathStr, "") MsgBox(newPathStr)