我的字符串是'MRK\xa0Software\xa0Services\xa0Private\xa0Limited' ,我想\xa0用空格替换十六进制部分 ( ),这样我得到MRK Software Services Private Limited 我可以进一步拆分成不同的词。
1 回答

芜湖不芜
TA贡献1796条经验 获得超7个赞
myString = "MRK\xa0Software\xa0Services\xa0Private\xa0Limited"
newString = myString.replace("\xa0", " ")
如果您收到 unicode 错误,您可以尝试:
newString = myString.replace("\\xa0", " ")
添加回答
举报
0/150
提交
取消