Answers for "non-words in python"

0

non-words in python

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'
Posted by: Guest on April-16-2020

Python Answers by Framework

Browse Popular Code Answers by Language