Created
July 5, 2011 19:15
-
-
Save acrymble/1065622 to your computer and use it in GitHub Desktop.
Strip Non Alpha-Numeric
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
# Given a text string, remove all non-alphanumeric | |
# characters (using Unicode definition of alphanumeric). | |
def stripNonAlphaNum(text): | |
import re | |
return re.compile(r'\W+', re.UNICODE).split(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment