有一文本:      about(100,1,"字符串1","字符串2","字符串3")我想把这个文本里的"字符串1"提取出来.请问正则式如何写?

解决方案 »

  1.   

    Function RegExpTest(patrn, strng) 
    Dim regEx, Match, Matches   
    Set regEx = New RegExp    
    regEx.Pattern = "("[^"]+")" 
    regEx.IgnoreCase = True    
    regEx.Global = True   
    Set Matches = regEx.Execute("about(100,1,"字符串1","字符串2","字符串3")")  
    For Each Match in Matches  
    RetStr(i) =  Match.Value 
    i=i+1
    Next 
    RegExpTest = RetStr 
    End Function 
    会匹配三个字符串,你取缔一个就可