You can use the \\S
regex:
String s = "Sonra görüşürüz";String replaced = s.replaceAll("\\S", "-");System.out.println(replaced); // outputs ----- ---------
You can use the \\S
regex:
String s = "Sonra görüşürüz";String replaced = s.replaceAll("\\S", "-");System.out.println(replaced); // outputs ----- ---------