Skip to content

Instantly share code, notes, and snippets.

@cmacrander
Last active August 29, 2015 13:57
Show Gist options
  • Save cmacrander/9895609 to your computer and use it in GitHub Desktop.
Save cmacrander/9895609 to your computer and use it in GitHub Desktop.
names_to_test = [
'blah',
'foo',
'bar',
]
for name in names_to_test:
stripped_name = util.clean_string(name)
pattern = r'^[A-Za-z]+$'
re.match(pattern, stripped_name)
if not_match:
raise Exception('{} {}'.format(name, stripped_name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment