作者vernc (cralvin)
看板EZsoft
标题[请问] 多文件用regexp替换的软体?
时间Mon Jan 19 15:12:30 2015
例:d:\temp下有1000多个html档
现在想用自订的regexp规则替换内容
像ultraedit这些都需要开启档案才能替换
但开启几千个……
请问有什麽tool能用regexp批次处理完全部档?
thx
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 1.175.222.177
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/EZsoft/M.1421651552.A.57E.html
1F:推 timeline: EmEditoru有 "在档案中取代" 可以指定批次处理路径 01/19 15:31
2F:→ oversky0: dnGrep 01/19 15:32
上面两个试过是只能列模式
<td class="td_listcell_r1c2">1</td>
<td class="td_listcell_r1c3">2</td>
<td class="td_listcell_r1c1">3</td>
<td class="td_listcell_r1c4">4</td>
像下这个.*r1c4\"\>4\<\/td\> 想砍掉全部四行就不行,只会砍第四行
还是能改那选项做到上面?thx
※ 编辑: vernc (111.242.34.230), 01/19/2015 18:25:05
3F:→ SilentWorld: EmEditor 符合需求阿,你好像REGEXP下错了吧 01/19 19:05
4F:→ quamtum: .*r1c4\"\>\d\<\/td\> 试试 01/19 20:07
5F:→ rick65134: ultraedit好像可以多档案搜寻或取代耶 01/20 14:13
最後自已写vbs处理
本来是用fso作的,发现日文会乱掉改用adodb.stream
tmp=Trim(TrageTextFile.ReadLine)
请问fso版的这行在adodb.stream该怎麽做呢
.ReadLine的adodb.stream版是什麽?thx
※ 编辑: vernc (111.242.27.39), 01/20/2015 20:11:35
6F:推 HZYSoft: 用 sed 指令可以很简单的作到,功能非常强大 01/22 20:34
8F:→ HZYSoft: 可以同时指定多条 regexp rules 做取代 01/22 20:35
9F:→ HZYSoft: 搭配 cygwin + bash 模拟UNIX shell 就更猛了 01/22 20:36
10F:→ HZYSoft: 还可以跟 shell script 结合,非常顺手 01/22 20:36