正则匹配指定字符开头指定字符结尾中间部分的数字
Sub tes() Strs = "AO 22m IVSd 7mm LVDd 43mm RV 18mm" Set reg = CreateObject("vbscript.regexp") With reg .Global = False .ignorecase = True .Pattern = "IVSd\s+(\d{1,2}?)mm" ' Set mh = .Execute(Strs) res = .Execute(Strs)(0).submatches(0) End With End Sub