<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transform(self, text):
 """Replaces characters in string ``text`` based in regex sub"""

        return re.sub(self.regex, self.repl, text)