Answers for "how to replace all characters in a string java after specific character"

2

replace all occurrences of a character in a string java

String phrase = "An_Apple_A_Day_Keeps_The_Doctor_Away";
System.out.println(phrase.replaceAll("_", " ");
// prints 'An Apple A Day Keeps The Doctor Away'
Posted by: Guest on August-03-2021
0

java replaceall single character

.replaceAll("(?<!\\S)[^ ](?!\\S)", " ").trim()
Posted by: Guest on March-06-2020

Code answers related to "how to replace all characters in a string java after specific character"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language