declare @t table
(col varchar(100))insert @t
select '<a href="http://www.colorsavant.com" target=_blank>http://www.colorsavant.com' union all
select '<a href="http://www.type.cn" target=_blank>http://www.type.cn'select substring(col,charindex('"',col)+1,charindex('"',col,charindex('"',col)+1)-charindex('"',col)-1
) from @t

解决方案 »

  1.   

    <a href="http://www.colorsavant.com" target=_blank>http://www.colorsavant.com
    我只想要http://www.colorsavant.com 如何过滤
    ===========>上面字符串有两个"http://www.colorsavant.com ",请问楼主要第一个还是第二个?
      

  2.   

    .net 正则表达式方法:
    -------------------
    Dim   s   As   String   =   TextBox1.Text
    s   =   "<a href="http://www.colorsavant.com" target=_blank>http://www.colorsavant.com
    /a>"
    Dim   pattern   As   String   =   "\<a.*\>(.*)\<.*"
    Dim   regex   As   System.Text.RegularExpressions.Regex   =   New   System.Text.RegularExpressions.Regex(pattern)
    s   =   regex.Replace(s,   "$1",   -1)
    TextBox1.Text   =   s