Last active
January 31, 2018 11:31
-
-
Save vedal/6f13b3603ad4b3924f74ec01cfe5f7c9 to your computer and use it in GitHub Desktop.
[Remove punctuation from string using regex] Use regex to clean string punctuation fast #punctuation #strip #regex
This file contains 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
// vim: syntax=python | |
# remove punctuation | |
re.sub(r'[^\w\s]','',string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment