human
Remove duplicate chars using regex?
assistant
Here is some code to remove duplicate characters from string 'ffffffbbbbbbbqqq'

re.sub('([a-z])\\1+', '\\1', 'ffffffbbbbbbbqqq')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.