The replaceAll() method in java (and similarly named methods in other languages) is used to replace all instances of a character in a string with another character.
try (Stream<String> lines = Files.lines(targetFile)) { List<String> replacedContent = lines.map(line -> StringUtils.…
java java-8 newline java-stream replaceall