Skip to content

Instantly share code, notes, and snippets.

@8bit-pixies
Created November 25, 2012 04:15
Show Gist options
  • Save 8bit-pixies/4142374 to your computer and use it in GitHub Desktop.
Save 8bit-pixies/4142374 to your computer and use it in GitHub Desktop.
chall113
import re
from string import strip
def blueS(string):
if re.search("^\d+\.\d+$",strip(string)):
return 'float'
elif re.search("^\d\d-\d\d-\d{4}$",strip(string)):
return 'date'
elif re.search("^[-+]?\d+$",strip(string)):
return 'int'
else:
return 'text'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment