先整个函数做替换用
-
Function RegExp(str1, patrn, replStr)
-
Dim regEx
-
Set regEx = New RegExp
-
regEx.Pattern = patrn
-
regEx.IgnoreCase = True
-
regEx.Global = True
-
RegExp = regEx.Replace(str1, replStr)
- End Function
- strContent = RegExp(strContent, "([ ])([ ])+", chr(9))
- strContent = RegExp(strContent, "([0-9][0-9][0-9][0-9])[,]([0-9])", "$1" & chr(32) & "$2")
- strContent = RegExp(strContent, "([\D])[,]([\D])", "$1" & chr(32) & "$2")