<human>:  How can I do multiple substitutions using regex in python?
<bot>: Here is some code to double each character in string `text.read()`

re.sub('(.)', '\\1\\1', text.read(), 0, re.S)

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