SyntaxFix
Write A Post
Hire A Developer
Questions
Using an ungreedy match is a good start, but I'd also suggest that you reconsider any use of .* -- what about this?
.*
groups = re.search(r"\([^)]*\)", x)