import re
from sys import stdin
text = stdin.read ( )
author = r"(?:[A-Z][A-Za-z'`-]+)"
etal = r"(?:et al\. ?)"
additional = f"(?:,? (?:(?:and |& )?{author}|{etal}))"
year_num = "(?:19|20)[0-9][0-9]"
page_num = "(?:, p\. ? [0-9]+)?" # Always optional
year = fr"(?:, *{year_num}{page_num}| *\( {year_num}{page_num}\) )"
regex = fr'\b (?!(?:Although|Also)\b ){author}{additional}*{year}'
matches = re .findall ( regex, text)
matches = list ( dict .fromkeys ( matches) )
matches.sort ( )
#print(matches)
print ( "\n " .join ( matches) )
aW1wb3J0IHJlCmZyb20gc3lzIGltcG9ydCBzdGRpbgoKdGV4dCA9IHN0ZGluLnJlYWQoKQoKYXV0aG9yID0gciIoPzpbQS1aXVtBLVphLXonYC1dKykiCmV0YWwgPSByIig/OmV0IGFsXC4/KSIKYWRkaXRpb25hbCA9IGYiKD86LD8gKD86KD86YW5kIHwmICk/e2F1dGhvcn18e2V0YWx9KSkiCnllYXJfbnVtID0gIig/OjE5fDIwKVswLTldWzAtOV0iCnBhZ2VfbnVtID0gIig/OiwgcFwuPyBbMC05XSspPyIgICMgQWx3YXlzIG9wdGlvbmFsCnllYXIgPSBmciIoPzosICp7eWVhcl9udW19e3BhZ2VfbnVtfXwgKlwoe3llYXJfbnVtfXtwYWdlX251bX1cKSkiCnJlZ2V4ID0gZnInXGIoPyEoPzpBbHRob3VnaHxBbHNvKVxiKXthdXRob3J9e2FkZGl0aW9uYWx9Knt5ZWFyfScKbWF0Y2hlcyA9IHJlLmZpbmRhbGwocmVnZXgsIHRleHQpCm1hdGNoZXMgPSBsaXN0KCBkaWN0LmZyb21rZXlzKG1hdGNoZXMpICkKbWF0Y2hlcy5zb3J0KCkKCiNwcmludChtYXRjaGVzKQpwcmludCAoIlxuIi5qb2luKG1hdGNoZXMpKQ==
stdin
QWx0aG91Z2ggSmFtZXMgKDIwMjApIHJlY29nbml6ZWQgYmxhYmxhYmxhLCBTbWl0aCBldCBhbC4gKDIwMjApIGZvdW5kIG1pbWltaS4gClRob3NlIGluY29uc2lzdGVudCByZXN1bHRzIGFyZSBhIHNpZ24gb2YgbGFsYWxhIChHcmVlbiwgMjAxMDsgR3JpbW0sIDE5OTApLiAKQWxzbyBKYW1lcyAoMjAyMCkgLi4u
Although James (2020) recognized blablabla, Smith et al. (2020) found mimimi.
Those inconsistent results are a sign of lalala (Green, 2010; Grimm, 1990).
Also James (2020) ...