VBA自定义函数代码如下:
Function mDate(mstr) As StringDim regXp As ObjectSet regXp = CreateObject("vbScript.regExp")With regXp .Global = False .Pattern = "\d+\.\d+\.\d+\-\d+\.\d+\.\d+" mDate = .Execute(mstr)(0)End WithEnd Function
有图有真相有附件