Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove special characters from string python

import re
# only remove special charactors but not white spaces
re.sub('[^A-Za-z0-9]+ ', '', mystring)
# remove special charactors and white spaces as well
re.sub('[^A-Za-z0-9]+', '', mystring)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #special #characters #string #python
ADD COMMENT
Topic
Name
2+1 =