'Method converts Apache\'s basic fnmatch to regular expression.
Assumption - Configs are assumed to be well-formed and only writable by
privileged users.
https://apr.apache.org/docs/apr/2.0/apr__fnmatch_8h_source.html
http://apache2.sourcearchive.com/documentation/2.2.16-6/apr__fnmatch_8h_source.html
:param str clean_fn_match: Apache style filename match, like globs
:returns: regex suitable for augeas
:rtype: str'

def fnmatch_to_re(self, clean_fn_match):

    if (sys.version_info < (3, 6)):
        return fnmatch.translate(clean_fn_match)[:(-7)]
    else:
        return fnmatch.translate(clean_fn_match)[4:(-3)]
