Could you please help me? I have "name surname patronomyc". I only want to replace the "surname patronomyc" with " * ". I can only replace everything with " * ".
String s = "name surname patname";
System.out.println(s.replaceAll( "\\B.\\B", "*" ))
Output -- n ** e s****e p ****e
How to replace only the surname and patronymic with " * "?
Example: name s ***** e p ***** e