In Python, I came to know that the (?P<group_name>…) syntax allows us to refer to the matched string through its name:
>>> import re
>>> match = re.search('(?P<name>.*) (?P<phone>.*)', 'John 123456')
>>> match.group('name')
'John'
What does that "P" mean in the syntax?