<input name="url" id="url" type="text" class="input" readonly="readonly" value="(.*?)" />
*****************************************************************************
http://feiyun0112.cnblogs.com/
*****************************************************************************
http://feiyun0112.cnblogs.com/
解决方案 »
- 小菜鸟问题---整型变量初始化的问题
- Http通信 跨线程访问异常
- 请教:TcpClient连接不能连续发数据
- 使用ListSearchExtender的时候遇到的ScriptManager问题
- 小鸟的问题:谁知道怎么写关于那个注册 你注册了 我这边就提示消息说一个人注册成功的问题
- 一个数据库连接的问题
- 如何在代码中执行 SQL脚本
- 请问怎样才能在DataGrid每行前面加上CheckBoxes?就像listView中设置了CheckBoxes一样
- 怎么把XML属性值绑定到DropDownList下
- C#程序设计中多个FORM地问题?
- easyui datagrid 删除行
- 在.net 4.0 的工程中使用3.5的控件
这个怎么用呢?private string regalurValidateAndReturnFoundResult0(string strToCheck)
{
string pattern =@"<input name="url" id="url" type="text" class="input" readonly="readonly" value="(.*?)" />";
System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex(pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
System.Text.RegularExpressions.Match m = r.Match(strToCheck);
StringBuilder strFoundResult = new StringBuilder();
if (m.Success)
{
strFoundResult.Append(m);
return txtFoundResult.Text=strFoundResult.ToString();
}
else
{
return txtFoundResult.Text = "";
}
}返回的是:
<input name="url" id="url" type="text" class="input" readonly="readonly" value="http://t.cn/zRG1OnA" />我要的只是里面的value的值哦。
");
string val = string.Empty;
if(mCollection!=null && mCollection.Count>0)
{
val = mCollection[0].Value;
}