How can I replace n/ repeating characters with a single character? All special characters !@#$%^&*()_-+=[]{};:'",<.>/?\|~ I need them to only appear once. I started embedding "replace"s but that got out of hand and required me to have several replaces per character.
String Examples:
- This is great!!!!!!!!!!!
- ''''''look at this!!!!!'''''
- $$$$$$$Money$$$$$$$
- ,,,,,,,,,come on''''''''''''
Desired Output:
- This is great!
- 'Look at this!'
- $Money$
- ,come on'