을 대체하지만, 나는이 모든 Replace symbol "%" with word "Percent" 아무것도 나를 위해 일한 노력했다찾아 자바 1.8.0 내가 %를 대체하려고에서 %
String str = "%28Sample text%29";
str.replaceAll("%29", "\\)");
str.replaceAll("%28", "\\(");
System.out.println("Replaced string is " + str);
일치하지 않는 자바. 미리 감사드립니다.
사용'replace'합니다. –
'replaceAll'은 원래'String' 객체를 변경하지 않습니다. 대신 결과는 새로운'String' 객체로 반환됩니다. – Alex