[Solved] java , inserting between duplicate chars in String [closed]
Well, you could try: Example 1: Using REGEX public static void main(String[] args) { String text = “Hello worlld this is someething cool!”; //add # between all double letters String processingOfText = text.replaceAll(“(\\w)\\1”, “$1#$1”); System.out.println(processingOfText); } Example 2: Using string manipulations public static void main(String[] args) { String text = “Hello worlld this is someething … Read more