看板 EZsoft 關於我們 聯絡資訊
23_0023_24.jpg -> 023_023_024.jpg input0014@[email protected] -> input014@[email protected] 18_0018.jpg -> 018_018.jpg regexp版有位大大解出來了,是用//g Global matching The final two modifiers we will discuss here, //g and //c , concern multiple matches. The modifier //g stands for global matching and allows the matching operator to match within a string as many times as possible. In scalar context, successive invocations against a string will have //g jump from match to match, keeping track of position in the string as it goes along. You can get or set the position with the pos() function. 這樣寫能處理上面三行,ant rename不能下//g、不過好像內建…… <Regexp Expr="(\d+)" Repl="00$1"/> <Regexp Expr="0*(\d*)(\d{3})" Repl="$1$2"/> -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.236.88.23 ※ 文章網址: https://www.ptt.cc/bbs/EZsoft/M.1488096370.A.CA0.html
mybaby520: 原來應該要這樣解... 02/26 20:12