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