Created
April 22, 2020 21:15
-
-
Save ishritam/75b1b39091692351aa6ffbbbf11cef3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text = 'Jersey number of Cristiano Ronaldo is 7, his twitter account is @Cristiano. ' | |
patterns=[ r'\d+', # sequence of digits | |
r'\D+', # sequence of non-digits | |
r'\s+', # sequence of whitespace | |
r'\S+', # sequence of non-whitespace | |
r'\w+', # alphanumeric characters | |
r'\W+', # non-alphanumeric | |
] | |
multi_re_find(patterns,text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment