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

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 16951

Latest Images

Trending Articles



Latest Images