使用GetResponse获得返回的String st后,
st中含有
<input type="hidden" name="ptk" id="ptk" value="554f6760343640a5b2ebdb80f2d3297d"/>
....
<input type="hidden" name="cd" id="cd" value="1490"/>如何提取出
554f6760343640a5b2ebdb80f2d3297d求代码!
st中含有
<input type="hidden" name="ptk" id="ptk" value="554f6760343640a5b2ebdb80f2d3297d"/>
....
<input type="hidden" name="cd" id="cd" value="1490"/>如何提取出
554f6760343640a5b2ebdb80f2d3297d求代码!
解决方案 »
- 软件发布时程序的图标怎么设置?大家帮忙
- 关于控制台程序多线程问题。希望老大们给些建议
- WPF 获取相对路径的问题
- 请问怎样打包才能将程序变成服务啊?
- sql 一个表中某列有多个不同值,且重复。如何得到重复数量最多的值?
- 非常的急. 问题相当的简单 谢谢大家了!
- 又一简单问题,关于access的数据处理,顶者有分
- 不知listbox的item值能不能修改呢?
- C#运行显示:无法找到名为“{myConverter}”的资源
- API变量怎样转为C#的变量?
- 时出时没 ASPNET: Make sure that the class defined in this code file matches
- winform 从listbox中删除一个项
System.Text.RegularExpressions.Regex.Matches(
st,
@"<input\s+[^>]*name\s*=[""']ptk[""'][^>]*value\s*=[""'](?<url>.*?)[""'][^>]*/>",
System.Text.RegularExpressions.RegexOptions.IgnoreCase
| System.Text.RegularExpressions.RegexOptions.Singleline);foreach (System.Text.RegularExpressions.Match m in mc)
{
Console.WriteLine("value:{0}", m.Groups["url"].Value);
}
public static string GetStartEndStr(string source, string start, string end)
{
string str = "";
int len1 = source.IndexOf(start);
if (len1 > -1)
{
string cutstr = source.Substring(len1 + (start).Length);
int len2 = cutstr.IndexOf(end);
str = cutstr.Substring(0, len2);
}
return str;
}GetStartEndStr(html, "id=\"ptk\" value=\"", "\"");