+ 2
How to remove special characters and numbers from string !
6 ответов
+ 4
Mohammed Moin
Use Regex to get only Alphabets from String.
+ 4
Mohammed Moin
You can learn Regex using this cheat sheet
https://www.sololearn.com/post/815377/?ref=app
+ 3
Mohammed Moin
No need to remove. You can just get only Alphabets from the string using Regex
-----------
import re
patt = "[a-zA-Z]"
str1 = "-₹+₹+₹&#@+&&abdba AGH"
print (re.findall(patt, str1))
Remember here findall returns array so you need to convert in string.
+ 1
I want to remove both special characters and numbers
+ 1
It is also removing space which I need it
0
Use Regex.