段落一:
=1){show_icontab();}" name="atc_title" value="Re:人生感悟" tabindex="1" title="请输入标题" />
</div>段落二:
);}" name="atc_title" value="Re:三角裤" tabindex="1" title="请输入标题" />
==========================================其中,这个字符串
name="atc_title" value="

" tabindex="1"
这两串字符串是固定的。==========================================我想提取:
Re:人生感悟
Re:三角裤这两给字符串,用正则提取也行 

解决方案 »

  1.   

    js 的提取方法:var aa=document.getElementByName('atc_title')[0];
    var aa=document.getElementByName('atc_title')[1];
      

  2.   

    string s = @"=1){show_icontab();}"" name=""atc_title"" value=""Re:人生感悟"" tabindex=""1"" title=""请输入标题"" />
    </div>";
    string r = Regex.Match(s, @"(?is)name=""atc_title"" value=""Re:(.+?)""").Groups[1].Value;
    Response.Write(r);
      

  3.   

    这样:
    string s = @");}"" name=""atc_title"" value=""Re:三角裤"" tabindex=""1"" title=""请输入标题"" />";
    string r = Regex.Match(s, @"(?is)name=""atc_title"" value=""Re:(.+?)"" tabindex=""1""").Groups[1].Value;
    Response.Write(r);
      

  4.   

    string str = @");}"" name=""atc_title"" value=""Re:三角裤"" tabindex=""1"" title=""请输入标题"" />";
    Response.Write(Regex.Match(s, @"(?is)name=""atc_title"" value=""Re:(.+?)""[^>]*/>").Groups[1].Value);
    三角裤