如何在最后一个括号中获取字符串?

时间:2020-04-20 07:30:15

标签: python regex

我想将字符串放在一对括号内。

例如,我的字符串是Here is my string (This is the string in parenthesis (and this is the second layer))

我想得到This is the string in parenthesis (and this is the second layer))

我尝试使用(?<=\()(.*?)(?=\)),但得到['and this is the second layer']

什么是正确的方法?

谢谢。

0 个答案:

没有答案