我想从括号中检索字符串。以下是正文
Kaminey (English: (The) (Sc)oundrels()hggg) asd (sa) dsad is a 2009 Indian caper thriller film directed by Vishal Bhardwaj and featuring Shahid Kapoor, Priyanka Chopra and Amol Gupte in the lead (roles). Set against the backdrop of the Mumbai underworld, Kaminey follows a rivalry between a pair of twins, one with a lisp and the other with a stutter, over the course of a single day..
现在从这段文字我想得到三个字符串
- (English: (The) (Sc)oundrels()hggg)
- (sa)
- (roles)
为此,我尝试了遵循正则表达式
re.compile(r'\(.*?\)')
re.compile(r'/\(([^)]+)\)/')
这将匹配深度为1的括号
相关问题 更多 >
编程相关推荐