Created
November 5, 2015 15:50
-
-
Save lambdamusic/0c340685bd6e278e8b2f to your computer and use it in GitHub Desktop.
Find all letters in string (regex)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment