python regex remove digits from string

Solutions on MaxInterview for python regex remove digits from string by the best coders in the world

showing results for - "python regex remove digits from string"
Charlotte
25 Jan 2018
1# credit to the Stack Overflow user in the source link
2# add a space before \d+ to exclude numbers close to letters, as b3 for example
3
4s = "This must not be deleted, but the number at the end yes 134411"
5s = re.sub("\d+", "", s)