I need to replace all '%' characters in string with "%25" but I don't want to replace % in %25 to avoid situation, when I get something like this %%25. I want to do it in Java. Example: input: % sdfsdaf %25 expected result: %25 sdfsdaf %25
Do you know what should I use to get it?