请问怎样用word从txt文件中提取想要的特殊字符(如网址)啊?焦急中

来源:百度知道 编辑:UC知道 时间:2024/06/09 03:49:15
已知一个txt文件有很多行。如:
.....
onclick="document.location='http://www.palacemoon.com/pm/forum/60'"></center><br />
<br />
<center><img onload='javascript:if(this.width>850) this.width=850' src='http://i076.radikal.ru/0906/e3/54d9e535deef.jpg' onclick="document.location='http://www.palacemoon.com/pm/forum/60'"></center><br />
<br />
<center><img onload='javascript:if(this.width>850) this.width=850' src='http://s61.radikal.ru/i172/0906/7b/84a89c6506bf.jpg

用Replace Pioneer,首先要找到你要提取的文字的特征,用正则表达式表示出来,以你的为例是http://[\w\d\./]+.jpg,用Replace Pioneer提取的详细步骤:

1. ctrl-o打开文件
2. ctrl-h打开replace窗口
* 在Search for pattern输入:
"http://[\w\d\./]+.jpg"(不带双引号)
* 在Replace with pattern输入:
"$match\n"(不带双引号)
* 把Print Unmatched Unit前面的勾去掉
3. 点击Replace,完成! ctrl-s存盘。

可以使用WORD中的 “替换”功能
例如:
点开WORD文档,选择“编辑”→“替换”
查找内容:“<center><img onload='javascript:if(this.width>850) this.width=850' src=”
替换为:空格