import re


def loads(hesciiStr, prefix='x'):
    """
    Takes a hescii-encoded string and returns the utf-8 byte string.

    Args:
        hesciiStr: a hescii-encoded string
        prefix: string used to prefix all encoded hex values. Default 'x'
        
    Returns:
        A utf-8 byte string
        
    """
    def repl(match):
        s = match.group()
        return s[len(prefix):].decode('hex')
    pattern = prefix + r'([0123456789abcdefABCDEF][0123456789abcdefABCDEF])+'
    return re.sub(pattern, repl, hesciiStr)