Your regexp pattern is incorrect. It should be r'[A-Z]+'
.
Your current pattern matches only one character, mine matches one-or-more. Do read up on https://docs.python.org/2/library/re.html#regular-expression-syntax
Your regexp pattern is incorrect. It should be r'[A-Z]+'
.
Your current pattern matches only one character, mine matches one-or-more. Do read up on https://docs.python.org/2/library/re.html#regular-expression-syntax