def replace(document, search, replace):
    newdocument = document
    searchre = re.compile(search)
    for element in newdocument.getiterator():
        if element.tag == '{%s}t' % nsprefixes['w']:  # t (text) elements
            if element.text:
                if searchre.search(element.text):
                    element.text = re.sub(search, replace, element.text)
    return newdocument
Execute a command and only return the standard error
dataset/ETHPy150Open clips/pattern/pattern/web/docx/docx.py/replace--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/cmdmod.py/run_stderr