in reply to Re^7: Find images regardless of filetype extension.
in thread Find images regardless of filetype extension.

Ill give you that is compact!

But I think, that

is both compact but very clear and readable. On the otherhand, is compact and clever but not easily readable IMHO.

On the other hand, I really like your use of the ternary and references. I would not have thought of using it like that. ++ ++ I think that is quite clever. Thanks for the snippet of code.

Only one complaint, the way you wrote you regex it will skip any dot file. So .my-file would not be picked up.

zzSPECTREz