I want remove repeating character if more than 2 on user input, example
heloooo!!!!!!!!
====== hellloooo!!!!! ======
helooo!!!!! this is a 3 AAA battery holder
results should be
heloo!!
== helloo!! ==
heloo!! this is a 3 AAA battery holder
Let me know..
Something like this?
This looks for a run of three or more identical characters (non-whitespace, non-alphanumeric) and replaces them with two of these characters.