Is it just me or isn't .*? a bit redundant? I mean * is satisfied matching 0 times or more, so why make it optional? Also, as far as I know filenames need to have something before the extenstion, so .+ might be more accurate. Just my take on it.
#Moo
Comment on Re: Probably silly regex question / not so silly regex question
.*? means match the smallest number -- a non-greedy match. Whereas .* means match the largest number -- a greedy match. Changing the * to a + only changes the minimum match amount (0 to 1). As a side note you can say .{0,} as the equivalent to * and {1,} as + (and, for example, .{3,5} would match 3 to 5 characters).