def reRepl(m):
    ansiTypes = {
        'clear':   ansiFormatter.cmdReset(),
        'hashtag': ansiFormatter.cmdBold(),
        'profile': ansiFormatter.cmdUnderline(),
        }

    s = None
    try:
        mkey = m.lastgroup
        if m.group(mkey):
            s = '%s%s%s' % (ansiTypes[mkey], m.group(mkey), ansiTypes['clear'])
    except __HOLE__:
        pass
    return s
dataset/ETHPy150Open sixohsix/twitter/twitter/cmdline.py/reRepl