def _regex_substituter(m):
    """Regular Expression susbtitutions."""
    name = m.groups()[0]
    if ":" not in name:
        name = "word:%s" % name
    t, n = name.split(":")
    return "(?P<%s>%s)" % (n, REGEXERS[t])
dataset/ETHPy150Open amitu/smarturls/smarturls.py/_regex_substituter/original