I am trying to create a Python regex that allows me to delete all the worlds of a string containing a number.
For instance:
in = "ABCD abcd AB55 55CD A55D 5555" out = "ABCD abcd"
The regular expression for the delete number is trivial:
print(re.sub(r'[1-9]','','Paris a55a b55 55c 555 aaa'))
But I do not know how to delete the whole word, not just a number.
could you help me?
source share