[^\d\r\n]
替换后结果如下:
71
1
2
3
5
6
712
13
1415
5
17
18
18
18
20
22
22
23
23
25
26
28
28
29
29
30
替换后出现的空行未处理。

解决方案 »

  1.   

    再执行一次替换:(\n\r)|(^\r)|(\n$)
    空行就没了。
      

  2.   

    大侠再麻烦一下.不太会,我下面这样写,测试不行,直接卡死(字符放text2,处理后输出到text4):Set regex9 = CreateObject("VBScript.RegExp")
      regex9.IgnoreCase = True
      regex9.Global = True
      regex9.MultiLine = False
      regex9.Pattern = "[^\d\r\n]"
      
      Set Matches = regex9.Execute(Text2)
      For Each Match In Matches
          Text4 = Text4 & Match.Value
    '     Text4 = Text4 & Match.SubMatches(0) 也不对
      Next多谢!!