'用正则抽取需要的字符 'patrn=正则;str=需替换字符; Function GetStrExp(patrn,strng) on error resume next Dim regEx, Match Set regEx = New RegExp regEx.Pattern = patrn regEx.IgnoreCase = true regEx.Global = True Set Matches = regEx.Execute(strng) Set Match = Matches(0) GetStrExp = Match.SubMatches(0) End Function