那你就调用TextBox这个对象去处理你的字符串好了

解决方案 »

  1.   

    你想要webform下?
    确保你的url正确性后:
    string ContainURLStr=textBox1.Text;
    string url=string.Empty;
    string responseStr=Regex.Replace(ContainURLStr,@"(?<http>(http:[/][/]|www.)([a-z]|[A-Z]|[0-9]|[/.]|[~])*)","<a href=' $1 '>$1</a>");
    Response.Write(responseStr);
    你要winform下:
    Regex regex=new Regex(,@"(?<http>(http:[/][/]|www.)([a-z]|[A-Z]|[0-9]|[/.]|[~])*)";
    MatchCollection collection=regex.Matchs();
    foreach(Match m in collection)
    {
       string url=m.Value;
       //使用linklabel控件,将整个字符串赋值给它的text,并由获得的url确定LinkArea
    }
      

  2.   

    正则表示式替换
    正则表达式为: (\s|\n|^)(\w+://[^\s\n]+)
      

  3.   

    http://www.blueidea.com/tech/program/2004/1556.asp