import re rx = re.compile(r"\(([^()\d]*\d[^()]*)\)")s = "Some (Author) and (Author 2000) and (another author 2019)"print(rx.findall(s))
Standard input is empty
['Author 2000', 'another author 2019']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!