import re


def replace_pair(pair, content):
    """
    Uses regex to locate a pair.
    First element of the tuple is the original error token.
    Second element of the tuple is the replacement token.
    """
    return re.sub(pair[0], ' {} '.format(pair[1]), content)