code: def substitute(search, replace, text):
      'Regex substitution function. Replaces regex ``search`` with ``replace`` in ``text``'
      return re.sub(re.compile(str(search)), replace, textf substitute(search, replace, text):
      'Regex substitution function. Replaces regex ``search`` with ``replace`` in ``text``'
      return re.sub(re.compile(str(search)), replace, text)
docs: Regex substitution function. Replaces regex ``search`` with ``replace`` in ``text``