php我没有用过,感觉他的哪个\\1  就是$1 的意思 (第一个匹配的子串 用()表示的)

解决方案 »

  1.   

    也就是在一个字符串中找出dddddddddddddddd并且替换成<b>dddddddddddddddd</b>
      

  2.   

    public static string ExsCode(string InputString)
    {
    string OutString = InputString;
    my= new Regex(@"(\[URL\])(http:\/\/.[^\[]*)(\[\/URL\])",RegexOptions.IgnoreCase);
    OutString=my.Replace(OutString,@"<A HREF=""$2"" TARGET=_blank>$2</A>");
    return OutString;
    }button_click
    {
         Response.Write(ExsCode(this.TextBox1.Text));
    }
    文本框中输入 http://www.sina.com.cn
    显示的是 带超连 的 http;//www.sina.com.cn
      

  3.   

    应该是  Regex my= new Regex ........
      

  4.   

    还有就是Regex.Replace(strin,"\\[url\\](?.*)\\[\\/url\\]","<a href=$1>$1</a>")