发这么多帖子?
有什么不同吗?
/([^>]+?)(?=</B>)/g

解决方案 »

  1.   

    随手写的,也没测试。
    忘记加反斜线了。/([^>]+?)(?= <\/B>)/g 
      

  2.   

    自己弄出来了。。大家看一下啊wscript.echo   RegExpTest(ReadText("a.txt"))
    Function RegExpTest(strng)
    Set RegEx1=New RegExp
    RegEx1.Pattern="<b>([^<]*)</b>" '搜索字符串,括号用来定义子集
    RegEx1.IgnoreCase=True 'True不区分大小写,False区分
    RegEx1.Global=True 'Fasle只匹配第一个,True匹配全部
    Set A=RegEx1.Execute(strng)
    For Each x In A
    i=i+1
    y=y & x.SubMatches(0)
    If i Mod 2 = 0 Then
    y=y & vbCrLf
    else
    y=y & " "
    End If
    Next
    RegExpTest=y
    End FunctionFunction ReadText(FilePath)
    Dim Fso,Rso
    Set Fso=CreateObject("Scripting.FileSystemObject")
    Set Gso=Fso.GetFile(FilePath)
    Set Rso=Gso.OpenAsTextStream(1)
    ReadText=Rso.ReadAll
    End Function
    str = RegExpTest(ReadText("a.txt"))Set objie=WScript.CreateObject("internetexplorer.application")  
    objie.Navigate("about:blank")  
    objie.Document.parentwindow.clipboarddata.setdata "text",str  
    objie.Quiton error resume next Set ie=createobject("internetexplorer.application") 
    ie.navigate "about:blank" 
    ie.visible=False set fso=createobject("scripting.filesystemobject") 
    set f=fso.opentextfile("QQ.txt",2,true) Set objIE = CreateObject("InternetExplorer.Application") 
    objIE.Navigate("about:blank") 
    str = objIE.document.parentwindow.clipboardData.GetData("text") 
    objIE.Quit
    f.write str
    f.close
      

  3.   

    [Quote=引用 1 楼 syukugai 的回复:]
    发这么多帖子? 
    有什么不同吗? JScript code/([^>]+?)(?=</B>)/g
    [/Quote谢谢哈]
      

  4.   

    都不行啊自己弄出来了
    wscript.echo   RegExpTest(ReadText("a.txt"))
    Function RegExpTest(strng)
    Set RegEx1=New RegExp
    RegEx1.Pattern="<b>([^<]*)</b>" '搜索字符串,括号用来定义子集
    RegEx1.IgnoreCase=True 'True不区分大小写,False区分
    RegEx1.Global=True 'Fasle只匹配第一个,True匹配全部
    Set A=RegEx1.Execute(strng)
    For Each x In A
    i=i+1
    y=y & x.SubMatches(0)
    If i Mod 2 = 0 Then
    y=y & vbCrLf
    else
    y=y & " "
    End If
    Next
    RegExpTest=y
    End FunctionFunction ReadText(FilePath)
    Dim Fso,Rso
    Set Fso=CreateObject("Scripting.FileSystemObject")
    Set Gso=Fso.GetFile(FilePath)
    Set Rso=Gso.OpenAsTextStream(1)
    ReadText=Rso.ReadAll
    End Function
    str = RegExpTest(ReadText("a.txt"))Set objie=WScript.CreateObject("internetexplorer.application")  
    objie.Navigate("about:blank")  
    objie.Document.parentwindow.clipboarddata.setdata "text",str  
    objie.Quiton error resume next Set ie=createobject("internetexplorer.application") 
    ie.navigate "about:blank" 
    ie.visible=False set fso=createobject("scripting.filesystemobject") 
    set f=fso.opentextfile("QQ.txt",2,true) Set objIE = CreateObject("InternetExplorer.Application") 
    objIE.Navigate("about:blank") 
    str = objIE.document.parentwindow.clipboardData.GetData("text") 
    objIE.Quit
    f.write str
    f.close
      

  5.   


    javascript中 / 是正则表达式的界定符号。
    因为没有反斜线的话会出错。
    不过在VBS中就没这个问题了。