這是我的輸入和結果的正則表達式:從提取的正則表達式的值刪除括號
temp2 = '(LEFT-WALL)(who)(is.v)(the)(di(rect)or.n)(of)(Inceptio)(RIGHT-WALL)'
print regex.findall(r'\([^\)\(]*+(?:(?R)[^\)\(]*)*+\)', temp2)
結果:
['(LEFT-WALL)', '(who)', '(is.v)', '(the)', '(di(rect)or.n)', '(of)', '(Inceptio)', '(RIGHT-WALL)']
我想這種結果的:;
['LEFT-WALL', 'who', 'is.v', 'the', 'di(rect)or.n', 'of', 'Inceptio', 'RIGHT-WALL']
正則表達式的任何變化?