This wasn't tested, I assume, as it doesn't work as requested. Try it with my string below.
Update: To clarify: 'aaabcdabcddddddefgg' would become 'aaabcdabcddddddefg' using your version.
Update 2: Oops. I misread the question as 'all' duplicates in the string. Thanks to physi for pointing out my fault. Interesting exercise, anyway.
In reply to Re: Re: Replacing with multiple occurrences.
by perlguy
in thread Replacing with multiple occurrences.
by maithree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |