在boto3中过滤类似glob的正则表达式模式 [英] filter a glob-like regex pattern in boto3
本文介绍了在boto3中过滤类似glob的正则表达式模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以使用boto3的筛选器工具在存储桶中查找类似于glob目录中文件的键(技术上是子键)吗?
Can I use boto3's filter tool for finding keys (technically sub-keys) in a bucket akin to files in a directory using glob?
我想获取具有这样的模式的键列表,例如"key/**/< pattern>/**.gz"
.
I want to get a list of keys with a pattern like this "key/**/<pattern>/**.gz"
.
推荐答案
不幸的是没有.S3不提供服务器端支持来过滤结果(前缀和分隔符除外).
Unfortunately not. S3 provides no server-side support for filtering of results (other than by prefix and delimiter).
这篇关于在boto3中过滤类似glob的正则表达式模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文