标题:
教我怎样过滤这种网页的内容!!!
[打印本页]
作者:
噬血细胞Xxs
时间:
2009-6-5 12:01
标题:
教我怎样过滤这种网页的内容!!!
假设网址是 ftp://***.***.***.***/********.htm
想把网页里的 “A” 过滤为 “B”!
给个规则!!!
http://bbs.360.cn/img/face/05.gif
或者还需要什么条件?
作者:
无边无际
时间:
2009-6-5 13:03
你要求的是替换,广告过滤基本格式是: #(type)#(url)#(restring)###(replace string)
详细参考使用手册,或者论坛的教程
作者:
噬血细胞Xxs
时间:
2009-6-5 13:25
就是看过了都不懂才会问的....
#(type)#(url)#那里.....
说下!
另外能给个教程地址么?
作者:
噬血细胞Xxs
时间:
2009-6-5 13:29
本帖最后由 噬血细胞Xxs 于 2009-6-5 13:51 编辑
给个示范嘛!
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="urn:schemas-microsoft-comfficeffice"
xmlns:w="urn:schemas-microsoft-comffice:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="tongzhi2.files/filelist.xml">
<title>欢迎使用中国电信“蔚蓝校园”宽带</title>
<!--[if gte mso 9]><xml>
<oocumentProperties>
<o:Author>小桶</o:Author>
<o:LastAuthor>Datacom Division</o:LastAuthor>
<o:Revision>4</o:Revision>
<o:TotalTime>146</o:TotalTime>
<o:Created>2009-04-26T08:04:00Z</o:Created>
<o:LastSaved>2009-04-27T02:13:00Z</o:LastSaved>
<oages>1</oages>
<o:Words>60</o:Words>
<o:Characters>343</o:Characters>
<o:Company>数据</o:Company>
<o:Lines>2</o:Lines>
<oaragraphs>1</oaragraphs>
<o:CharactersWithSpaces>402</o:CharactersWithSpaces>
<o:Version>11.5606</o:Version>
</oocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>200</w:Zoom>
<wontDisplayPageBoundaries/>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<wunctuationKerning/>
<wrawingGridVerticalSpacing>7.8 磅</wrawingGridVerticalSpacing>
<wisplayHorizontalDrawingGridEvery>0</wisplayHorizontalDrawingGridEvery>
<wisplayVerticalDrawingGridEvery>2</wisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:SpaceForUL/>
<w:BalanceSingleByteDoubleByteWidth/>
<woNotLeaveBackslashAlone/>
<w:ULTrailSpace/>
<woNotExpandShiftReturn/>
<w:AdjustLineHeightInTable/>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<wontGrowAutofit/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:SimHei;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimHei;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:1 135135232 16 0 262144 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:SimHei;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:1 135135232 16 0 262144 0;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
mso-font-kerning:1.0pt;}
a:link, span.MsoHyperlink
{mso-ansi-font-size:9.0pt;
mso-bidi-font-size:9.0pt;
font-family:Verdana;
mso-ascii-font-family:Verdana;
mso-hansi-font-family:Verdana;
color:#333333;
mso-text-animation:none;
text-decoration:none;
text-underline:none;
text-decoration:none;
text-line-through:none;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
span.style2
{mso-style-name:style2;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:\666E\901A\8868\683C;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="16386"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=ZH-CN link="#333333" vlink=purple style='tab-interval:
21.0pt;text-justify-trim:punctuation'>
<!--[if gte mso 9]><xml>
<v:background id="_x0000_s1025" o:bwmode="white" o:targetscreensize="800,600">
<v:fill recolor="t" type="frame"/>
</v:background></xml><![endif]-->
<div class=Section1 style='layout-grid:15.6pt'>
<p class=MsoNormal align=center style='text-align:center;layout-grid-mode:char'><b
style='mso-bidi-font-weight:normal'><span style='font-size:26.0pt;font-family:
SimHei;mso-hansi-font-family:Verdana;color:#333333'>学院</span></b><b><span
style='font-size:26.0pt;font-family:SimHei;color:#333333'>“数字校园”网络优化通知</span></b></p>
<p class=MsoNormal style='layout-grid-mode:char'><b><span lang=EN-US
style='font-size:26.0pt;mso-ascii-font-family:SimHei;mso-fareast-font-family:
SimHei'> </span></b></p>
<p class=MsoNormal style='layout-grid-mode:char'><b><span style='font-size:
16.0pt;font-family:SimHei'>为了提升您对数字校园的使用感知,电信公司计划于<span
lang=EN-US>2009</span>年<span lang=EN-US>4</span>月<span
lang=EN-US>28</span>日上午<span lang=EN-US>8</span>点对学院数字校园宽带网络进行优化升级,升级过程中可能会导致您的上网业务出现中断,并且升级完以后,<span
style='color:red'>需要使用新的客户端拨号器才能上网</span>。请各位同学务必提前安装好新客户端拨号软件,给您带来的不便敬请谅解。</span></b></p>
<p class=MsoNormal style='layout-grid-mode:char'><span lang=EN-US
style='font-size:16.0pt;mso-ascii-font-family:SimHei;mso-fareast-font-family:
SimHei'> </span></p>
<p class=MsoNormal align=center style='text-align:center;layout-grid-mode:char'><span
style='font-size:14.0pt;font-family:SimHei'>★<b>新客户端拨号软件</b>
请点击<b><u><span lang=EN-US style='color:blue'><a
href="http://202.103.194.212:9081/pop/version/download.html"><u><span
lang=EN-US style='mso-ansi-font-size:14.0pt;mso-bidi-font-size:14.0pt'><span
lang=EN-US>下载</span></span></u></a></span></u></b><span
style='color:black'>安装 点击查看<b><u><span
lang=EN-US><a href="ftp://222.216.111.198/doc5.doc"><u><span lang=EN-US
style='mso-ansi-font-size:14.0pt;mso-bidi-font-size:14.0pt'><span lang=EN-US>帮助</span></span></u></a></span></u></b></span></span></p>
<p class=MsoNormal align=center style='text-align:center;layout-grid-mode:char'><span
style='font-size:14.0pt;font-family:SimHei'>★<b>更改密码、网上充值</b>及其他<span
class=GramE><b>自服务</b>请访问</span><b><u><span
lang=EN-US>http://gx.ct10000.com/campus_card/index.html</span></u></b></span></p>
<p class=MsoNormal align=center style='text-align:center;layout-grid-mode:char'><span
class=style2><span lang=EN-US style='font-size:16.0pt'> </span></span></p>
<p class=MsoNormal align=center style='text-align:center;layout-grid-mode:char'><span
class=style2><b><span style='font-size:16.0pt;font-family:SimHei'>客服电话:<span
lang=EN-US style='color:#FF6600'>10000</span></span></b></span><span
class=style2><b><span lang=EN-US style='font-size:16.0pt;mso-ascii-font-family:
SimHei;mso-fareast-font-family:SimHei'> </span></b></span><span
class=style2><b><span lang=EN-US style='font-size:16.0pt;font-family:SimHei'>
24</span></b></span><span class=style2><b><span style='font-size:16.0pt;
font-family:SimHei'>小时热线</span></b></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
</div>
</body>
</html>
复制代码
假设网址是 ftp://***.***.***.***/********.htm
想把网页里的 ““数字校园”网络优化通知” 过滤为 “ABDD”!
该如何?我不懂正则表达式!
作者:
smile16888
时间:
2009-6-5 15:39
你给的明显是HTTP的嘛,干嘛假设网址是FTP的?
#exd#*网址*#“数字校园”网络优化通知###ABDD
复制代码
注:网址处只写域名
作者:
噬血细胞Xxs
时间:
2009-6-5 17:17
本帖最后由 噬血细胞Xxs 于 2009-6-5 17:21 编辑
5#
smile16888
那ftp网的源文件确实是这样啊!
是 #exd#*ftp://***.***.***.***/********.htm*#“数字校园”网络优化通知###ABDD 么?
不行啊!
没域名怎么办...
作者:
Aycox
时间:
2009-6-6 20:54
ftp:不支持。
假设网址是 http://bbs.ioage.com/cn/forum-36-1.html,那么#5楼规则说的“网址”可以是这个地址中的域名或任何一部分(当然也需有一定的识别性,否则就和#ex#规则无异了)。
欢迎光临 世界之窗论坛 (http://bbs.theworld.cn/)
Powered by Discuz! 7.2