An extension, with or without the leading dot, is compared with the end of the file name after a dot, ignoring the case of the letters: “doc” and “.doc” match “a.doc” and “a.DOC”, but neither “mydoc” nor “a.xdoc”; an extension of several parts, such as “tar.gz”, matches “a.tar.gz”. An empty extension matches a file name without an extension.