http://10.142.6.32/search.asp?no=  我要提取http://10.142.6.32  这部分 要怎么实现? 
在线等!

解决方案 »

  1.   


    Private Sub Form_Load()
        Dim s As String
        Dim i As Integer
        s = "http://10.142.6.32/search.asp?no="
        i = InStrRev(s, "/")
        MsgBox Left(s, i - 1)
    End Sub
      

  2.   

    mid("http://10.142.6.32/search.asp?no=",1,instr( instr( 1, "http://10.142.6.32/search.asp?no=", "//" ) + 2,"http://10.142.6.32/search.asp?no=","/")-1)其实就如一楼所写,挺简单的,俺这个是故意写得复杂了
      

  3.   

    Private Sub Form_Load()
    MsgBox Left("http://10.142.6.32/search.asp?no= ", 18)
    End Sub
      

  4.   

     Dim str As String
            Dim col() As String
            str = "http://10.142.6.32/search.asp?no="
            col = str.Split("/")
            MsgBox(col(0) & "//" & col(1) & col(2))
      

  5.   

    use "mid" functiondim str as string
    dim strTmp as string
    str="12345678"
    strTmp=mid(str,1,2)="12"
      

  6.   

    正则表达式,匹配符是:"http://((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)"