Skip to content

Instantly share code, notes, and snippets.

@arsho
Created November 20, 2016 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arsho/6ce176810360ee622b7c35cc5c7c5429 to your computer and use it in GitHub Desktop.
Save arsho/6ce176810360ee622b7c35cc5c7c5429 to your computer and use it in GitHub Desktop.
Using regular expression to allow only a to z and A to Z letters
import re
word = input()
if(re.match(r'^[a-zA-Z]+$',word)):
print("matched")
else:
print("not matched")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment