一个在括号内,另一个在括号外。我想在第二个“from”之前获得匹配的文本: select t2.f1 as rf1, (select t1.f1 from table1 t1 where t1.f1 = t2.f2) as rff, t2.f3 as rf3 我测试的python正则表达式是: ^\s*select\s+(?\s+from 返回:SELECTED t2.f1 as rf1, (select t1.f1 任何人都知道如何修改正则表达式以获得SELECTED t2
的单词括在花括号{}中。在里面。"This is {matchA} and {matchB} but I need {matchC!:\.|(\\{)|[^}'\n])*}来获取{}之间的所有匹配,但它以匹配的形式返回以下内容:
"matchA","matchB","matchC!matchD","matchE"和&quo