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

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -