Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python string exclude non alphabetical characters

import re

regex = re.compile('[^a-zA-Z]')
#First parameter is the replacement, second parameter is your input string
regex.sub('', 'ab3d*E')
#Out: 'abdE'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #string #exclude #alphabetical #characters
ADD COMMENT
Topic
Name
3+5 =