I have string like below Which contains non ascii characters and other special characters:
“Projected Set-tled Balan&ce†456$
How to remove all those unwanted characters and get a clean string like below which only has only small or capital alphabets and numbers.
Project Settled Balance 456
I'm trying to achieve it with the help of regex [a-zA-Z0-9 ]
I'm expecting a way to return string which matches this regex:
pat = re.compile('^[A-Za-z0-9 ]+')
stripped_string = string.strip().lower()
print(stripped_string)
print(pat.match(stripped_string))
But this is not returning anything.