犯了个失误,在excel中下拉数据时不小心端口号自增了。大概上万条数据,写了个正则表达式,完美解决问题。

curl -X GET http://10.0.0.150:8090/xxx?param=3000001;

curl -X GET http://10.0.0.150:8090/xxx?param=3000001;
curl -X GET http://10.0.0.150:8091/xxx?param=3000001;

  

Private Sub RegExp_Replace()
 
    Dim RegExp As Object
    Dim SearchRange As Range, Cell As Range
    
    '此处定义正则表达式
    Set RegExp = CreateObject("vbscript.regexp")
    RegExp.Pattern = "150:.*/"
     
    '此处指定查找范围
    Set SearchRange = ActiveSheet.Range("A1:A5000")
    
    '遍历查找范围内的单元格
    For Each Cell In SearchRange
        Set Matches = RegExp.Execute(Cell.Value)
        If Matches.Count >= 1 Then
            Set Match = Matches(0)
            Cell.Value = RegExp.Replace(Cell.Value, "150:8090/")
        End If
    Next
 
End Sub

  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-03-07
猜你喜欢
  • 2021-08-22
  • 2021-10-15
  • 2022-12-23
  • 2021-04-28
  • 2021-09-03
  • 2022-12-23
  • 2021-11-04
相关资源
相似解决方案