pjblog的ubbcodeasp文件(2)

re.Pattern = "\[url](.[^\[]*)\[\/url]"
   Set strMatchs=re.Execute(strContent)
   For Each strMatch in strMatchs
    tmpStr1=checkURL(strMatch.SubMatches(0))
    strContent=replace(strContent,strMatch.Value,"<a target=""_blank"" href="""https://www.jb51.net/&tmpStr1&""">"https://www.jb51.net/&tmpStr1&"</a>",1,-1,0)
   Next

   re.Pattern = "\[ed2k=([^\r]*?)\]([^\r]*?)\[\/ed2k]"
   Set strMatchs=re.Execute(strContent)
   For Each strMatch in strMatchs
    tmpStr1=checkURL(strMatch.SubMatches(0))
    tmpStr2=strMatch.SubMatches(1)
    strContent=replace(strContent,strMatch.Value,"<img"" src=""https://www.jb51.net/images/ed2k.gif"" alt=""""/><a target=""_blank"" href="""https://www.jb51.net/&tmpStr1&""">"https://www.jb51.net/&tmpStr2&"</a>",1,-1,0)
   Next

   re.Pattern = "\[ed2k]([^\r]*?)\[\/ed2k]"
   Set strMatchs=re.Execute(strContent)
   For Each strMatch in strMatchs
    tmpStr1=checkURL(strMatch.SubMatches(0))
    strContent=replace(strContent,strMatch.Value,"<img"" src=""https://www.jb51.net/images/ed2k.gif"" alt=""""/><a target=""_blank"" href="""https://www.jb51.net/&tmpStr1&""">"https://www.jb51.net/&tmpStr1&"</a>",1,-1,0)
   Next

   re.Pattern = "\[email=(.[^\]]*)\](.[^\[]*)\[\/email]"
   Set strMatchs=re.Execute(strContent)
   For Each strMatch in strMatchs
    tmpStr1=checkURL(strMatch.SubMatches(0))
    tmpStr2=strMatch.SubMatches(1)
    strContent=replace(strContent,strMatch.Value,"<a href=""https://www.jb51.net/mailto:"https://www.jb51.net/&tmpStr1&""">"https://www.jb51.net/&tmpStr2&"</a>",1,-1,0)
   Next

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wfzzgs.html