- Dim FileName
- FileName = "0123200300100010001"
- WScript.Echo RegText(FileName)
-
- Function RegText(RegStr)
- Dim RegEx
- Set RegEx = New RegExp
- RegEx.Pattern = "(\d{4})(\d{4})(\d{3})(\d{4})(\d{4})"
- RegText = RegEx.Replace(RegStr, "$1-$2-$3-$4-$5")
- Set RegEx = Nothing
- End Function
复制代码
|