Skip to content

Instantly share code, notes, and snippets.

@bdkech
Created May 2, 2019 01:29
Show Gist options
  • Save bdkech/679a9cacc60bdd17e5f38f71bc7bcb96 to your computer and use it in GitHub Desktop.
Save bdkech/679a9cacc60bdd17e5f38f71bc7bcb96 to your computer and use it in GitHub Desktop.
def standardize(s):
import re
try:
standard_s = re.sub('[^0-9a-zA-Z]+', '_', str(s)).lower()
return standard_s
except Exception as e:
print("ERROR exception caught: " + str(e))
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment