def get_match_extension(using=None):
    """
    Gets the extension that the template loader will match for
    django-jinja. This returns Jinja2.match_extension.

    The "using" parameter selects with Jinja2 backend to use if
    you have multiple ones configured in settings.TEMPLATES.
    If it is None and only one Jinja2 backend is defined then it
    will use that, otherwise an ImproperlyConfigured exception
    is thrown.
    """
    from .backend import Jinja2
    from django.template import engines
    if using is None:
        engine = Jinja2.get_default()
    else:
        engine = engines[using]
    return engine.match_extension
