Find all letters in string (regex)
# http://stackoverflow.com/questions/8199398/extracting-only-characters-from-a-string-in-python import re st = ".srep05794" res = " ".join(re.findall("[a-zA-Z]+", st))