Re: [問題] 怎抓到全部的()

看板RegExp (正規表示式 Regular Expression)作者 (cralvin)時間6月前 (2024/10/11 12:03), 編輯推噓0(008)
留言8則, 3人參與, 1年前最新討論串2/2 (看更多)
http://www.antp.be/software/renamer email作者請他更新TRegExpr版本 經過一年時光(看記錄是2023.12)回信了 那位幫忙測一下、看"negative lookahead" and "Recursion"等這些有沒有問題 若想增加什麼功能也可以說一聲 Hi, Better late than never, I took the time to make a build of Ant Renamer with a newer version of TRegExpr, and fixing two small bugs at the same time. If you are still interested, could you test if it works as intended with that new version? As I'm not sure how to use these advanced regexp functionalities :) https://update.antp.be/renamer/antrenamer2121.zip (simply replace the renamer.exe of your current install by that one) If it works fine, I'll release that as version 2.12.1 or 2.13.0, depending if I add or a new function to it in the next days. -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.239.53.110 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/RegExp/M.1728619438.A.BB1.html

02/27 08:59, 1年前 , 1F
四年後的今天這種千古難題隨便就能解了
02/27 08:59, 1F

02/27 08:59, 1年前 , 2F
'\((?:[^()]+|\([^()]+\))*\)' 真是神奇
02/27 08:59, 2F

02/27 09:14, 1年前 , 3F
\((?:[^()]*|\((?:[^()]*|\([^()]*\))*\))*\) 三層嵌套
02/27 09:14, 3F

02/27 09:15, 1年前 , 4F
4層自己看著擴展繼續寫下去而已
02/27 09:15, 4F

02/27 09:20, 1年前 , 5F
這不算千古難題吧,原文大家就提供解答了
02/27 09:20, 5F

02/27 09:21, 1年前 , 6F
包含原原po想要的不限層數寫法
02/27 09:21, 6F

03/02 00:36, 1年前 , 7F
chatGPT ?
03/02 00:36, 7F

03/02 14:12, 1年前 , 8F
哦 我看到了原文有回了解法
03/02 14:12, 8F
文章代碼(AID): #1d2AEkkn (RegExp)
文章代碼(AID): #1d2AEkkn (RegExp)