阅读背景:

如何使用Python在文件夹中搜索与正则表达式匹配的文件名?

来源:互联网 

I am having some difficulty writing a function that will search through a directory for a file that matches a specific regular expression (which I have compiled using 're.compile'). So my question is: How do I search through a directory (I plan to use os.walk) for a file that matches a specific regular expression? An example would be very much appreciated. Thanks in advance. I am having some difficulty writing a function




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: