def make_regex(spec):
    fstring, delim, keyword = spec.rpartition(':')
    formatter = formatters[fstring or 'string']
    return r'(?P<{keyword}>{regex})'.format(keyword=keyword, regex=formatter)
convert a flask-style <spec> into django regex.
dataset/ETHPy150Open afg984/django-fsu/django_fsu/__init__.py/make_regex