'Extracting Country Name from Affiliations in pubmed

This is a question that have been discussed earlier, eg Extracting Country Name from Author Affiliations

I have a similar, but not identical problem. In a list extracted from pubmed with easypubmed, the affiliatons contain sometimes countries and sometimes only American states. What is the easiest way to identify the country or the state and add a column with only country?

Best regards



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source