Trying to format this string and strip out the non-ascii characters
import re
text = '<phone_number><![CDATA[0145236243 <0x0C><0x05><0x4>
]>'
clean = re.sub('[^\x00-\x7f]',"", text)
This does not seem to do the job properly.Does someone have a proper solution. I have also uploaded a file in case stackoverflow has formatted the non-ascci characters.