Let say, I have this
Hello ??? WHERE ARE YOU!!!! Comon ?!?!?!
desired outout
Hello ? WHERE ARE YOU!!!! Comon ?!
How can I achieve this? I tried preg_replace_callback
but to no luck. I used Finding the shortest repetitive pattern in a string as an starting point but it works on complete sentence, I need it to work on word by word + I need to remove duplicate computations only (patterns)? Live Code