作者vernc (cralvin)
看板Perl
标题Re: [请问] Ant Renamer的regexp问题?
时间Tue Feb 14 19:06:17 2017
23_0023_24.jpg -> 023_023_024.jpg
input0014@
[email protected] -> input014@
[email protected]
<Regexp Expr="(\D*)(\d\.)" Repl="$1\0\0$2"/>
<Regexp Expr="^(\D*)(\d\d\.)" Repl="$1\0$2"/>
<Regexp Expr="^(\D*)0+(\d\d\d\.)" Repl="$1$2"/>
本来是用上面三行,但只能处理单一组数字
想做到如上处理复数的效果
想像那三行要同一个rule,在任何情况下都适用
如上面那二行都是三组数字,想在n组数字下都通用
请问这要怎下?
thx
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 1.173.175.178
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Perl/M.1487070379.A.7E4.html
※ 编辑: vernc (1.173.175.178), 02/15/2017 01:49:17
※ 编辑: vernc (1.173.175.178), 02/15/2017 02:02:09
1F:→ herculus6502: g选项 02/15 09:46
2F:→ vernc: 上面何解? 02/15 18:59