I am trying to get the words that start with a capital letter regardless of whether it has a special character or not in the word. Currently, my pattern only gets capital letters without accents.
I don't need numbers or hyphens, just accents or special characters in the letters.
pattern = r"\b[A-Z][a-z]*\b"
name = soup.select('h1.data-header__headline-wrapper')[0].text.strip()
name = re.findall(pattern, name)
name = " ".join(name)
Some examples. Special characters should be included to correctly return player 1 and 4.
�lvaro Fern�ndez
[]
#3
Rico Henry
['Rico', 'Henry']
Rico Henry
#24
Tariqe Fosu
['Tariqe', 'Fosu']
Tariqe Fosu
#29
Mads Bech S�rensen
['Mads', 'Bech']
Mads Bech