# Remove all the special characters
# replace all character exept A-Z a-z
import re
text = "That is a # ; '' 2 45 6 ?/..,,, test for removing multiple spaces"
document = re.sub(r'W', ' ', text)
print(document) # as we can see this regex expresion do not remove numbers
As we can see this regex expression do not remove numbersÂ
0 Comments