My string is 'MRK\xa0Software\xa0Services\xa0Private\xa0Limited'
and I want to replace the hexadecimal part (\xa0
) with spaces, such that I get
MRK Software Services Private Limited
which I can further split into different words.
答案 0 :(得分:1)
myString = "MRK\xa0Software\xa0Services\xa0Private\xa0Limited"
newString = myString.replace("\xa0", " ")
If you are getting unicode error you can try:
newString = myString.replace("\\xa0", " ")