diff --git a/s3path/current_version.py b/s3path/current_version.py index a9f481d..ed2f58d 100644 --- a/s3path/current_version.py +++ b/s3path/current_version.py @@ -759,7 +759,7 @@ def _compile_pattern_parts(self, prefix, pattern, bucket): new_regex_pattern += f'{self._path._flavour.sep}*(?s:{part.replace("**", ".*")})' continue new_regex_pattern += f'{self._path._flavour.sep}{fnmatch.translate(part)[:-2]}' - new_regex_pattern += '/*\Z' + new_regex_pattern += r'/*\Z' return re.compile(new_regex_pattern).fullmatch