I am having trouble with my regex for capturing consecutive capitalized words. Here is what I want the regex to capture:
"said Polly Pocket and the toys" -> Polly Pocket
Here is the regex I am using:
re.findall('said ([A-Z][\w-]*(\s+[A-Z][\w-]*)+)', article)
It returns the following:
[('Polly Pocket', ' Pocket')]
I want it to return:
['Polly Pocket']