Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Collect specific filenames using regex

$
0
0

I have a list of filenames. I want to collect filenames that are exactly one of these three patterns:

foo.extfoo-*.extfoo.*.ext

foo is a variable, * can be anything, ext is a file extension.

How would I do that using regex?

Thanks.


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>