类似这样的一段html模板文本<!--#include file="top.html" -->
<tr>
<td width="251" align="center" valign="top"><!--#include file="proleft.html" -->
<img src="images/about6.jpg" width="231" height="61"></td>
<td valign="top"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<!--#include file="down.html" -->
string pattern = "<!--#include file=\"([^\\]]*?)\" -->";
foreach (Match m in Regex.Matches(GetHtml.ToString(), pattern, RegexOptions.IgnoreCase))
{
}我应该怎样写才得取得所有包含文件的文件名?就是想得到top.html,proleft.html,down.html这些
<tr>
<td width="251" align="center" valign="top"><!--#include file="proleft.html" -->
<img src="images/about6.jpg" width="231" height="61"></td>
<td valign="top"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<!--#include file="down.html" -->
string pattern = "<!--#include file=\"([^\\]]*?)\" -->";
foreach (Match m in Regex.Matches(GetHtml.ToString(), pattern, RegexOptions.IgnoreCase))
{
}我应该怎样写才得取得所有包含文件的文件名?就是想得到top.html,proleft.html,down.html这些
解决方案 »
- 怎么样把dataGridView里的数据导出Excel
- C# 中如何设置文件夹的图标
- c# 串口程序设计 询问
- ASP.NET网站 音乐在线试听怎么做
- 请问这样显式的垃圾回收有效果吗
- winform如何像VB一样,可以把按钮颜色隐藏,让按钮与面板一个颜色
- 文件“bin\Debug\PMS.exe”正由另一进程使用
- Developer Express 子报表(200分--问题解决另发贴放分)在线等待!!
- C#操作word的组件权限错误?
- c# 怎么获取datagridview中DataGridViewComboBox的显示值(不是value实际值)啊?急
- 各位技术人才给小弟提些建议吧!闲时 谢谢
- C#串口关不掉为什么?
<tr>
<td width=""251"" align=""center"" valign=""top""><!--#include file=""proleft.html"" -->
<img src=""images/about6.jpg"" width=""231"" height=""61""></td>
<td valign=""top""><table width=""95%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">
<tr>
<!--#include file=""down.html"" -->";
string pattern = @"<!--\s*#include file=""([^""]*?)""[^>]*?-->";
MatchCollection mc = Regex.Matches(strHTML, pattern);
foreach (Match m in mc)
{
Response.Write(m.Result("$1") + "<BR>");
}