java - How to replace ¦ (broken bar) from a string? -


i getting json response this:

lorem ipsum ¦dolor sit amet

what want replace broken bars (¦).

i have tried .replaceall("\u00a6", "");, won't work.

i think you're not assigning result, , that's why you're not getting desired output. note replace , replaceall returns new string, doesn't modify string in-place.

it should work. if have problems, keep in mind can use directly:

string str = "sdfsdf¦sdfsdf" system.out.println(str.replaceall("¦", "")); // output: sdfsdfsdfsdf 

also there's no need replaceall, can use replace instead (that doesn't accept regex).


Comments

Popular posts from this blog

Combining PHP Registration and Login into one class with multiple functions in one PHP file -

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -