import re
regex = '\\[P\\] (.+?) \\[/P\\]+?'
line = (
    'President [P] Barack Obama [/P] met Microsoft founder [P] Bill Gates [/P], yesterday.'
    )
person = re.findall(regex, line)
print(person)
Python regex findall