Skip to content

Instantly share code, notes, and snippets.

@ishritam
Last active April 22, 2020 21:21
Show Gist options
  • Save ishritam/c8d6fbd20465dcbfb998c6525a6b88d6 to your computer and use it in GitHub Desktop.
Save ishritam/c8d6fbd20465dcbfb998c6525a6b88d6 to your computer and use it in GitHub Desktop.
test_phrase = 'It was 7 in Manchester United, he was given that number right after Beckham left.'
test_patterns=['[a-z]+', # sequences of lower case letters
'[A-Z]+', # sequences of upper case letters
'[a-zA-Z]+', # sequences of lower or upper case letters
'[A-Z][a-z]+', # one upper case letter followed by lower case letters
'[0-9]+'] # sequences of digits
multi_re_find(test_patterns,test_phrase)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment