pandaQQQ
Sub 提取()
    Dim Res()
    Dim objRegEx As Object
    Dim objMH As Object
    Dim j As Integer
    Set objRegEx = CreateObject("vbscript.regexp")
    objRegEx.Pattern = "(\d{4}-\d{2}-\d{2}|\d{4}.\d{2}.\d{2}).*?(([A-Z]{3})*\d+[\d.,]*元)"
    objRegEx.Global = True
    For i = 2 To Cells(Rows.Count, "A").End(xlUp).Row
    form = Cells(i, "A")
    Set objMH = objRegEx.Execute(form)
    If objMH.Count > 0 Then
        Cells(i, 2) = CStr(objMH(0).submatches(0))
        Cells(i, 3) = CStr(objMH(0).submatches(1))
    End If
    Next
    Set objRegEx = Nothing
    Set objMH = Nothing
End Sub

  

 

 

 

分类:

技术点:

相关文章:

  • 2021-11-05
  • 2022-01-31
  • 2022-01-17
  • 2021-11-23
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2022-01-02
猜你喜欢
  • 2021-12-19
  • 2022-12-23
  • 2021-12-27
  • 2021-06-22
  • 2021-06-22
  • 2022-01-02
  • 2021-06-18
相关资源
相似解决方案