I'm needing to locate any file that contains a single character filename with a 1-3 character extension.
I've spent some time searching for how to do this, but can't see to find the right combination of regex. I'm using a solution that requires boost regex, which I think is similar to perl regex.
Here are some examples should match:
1.exe
a.c
-.zip (a hyphen is ok for the first part of the filename)
These examples should not match:
1 (doesn't have an extension)
1a.exe (has 2+ chars before the period)
Examples I've tried:
^[.]+\.[a-z0-9]{1,3}$
^[a-z0-9]+\.[a-z0-9]{1,3}$
^[\w]\.[\w]{1,3}$
^([0-9a-z]{1})\..{1,3}
Thank you for any help you can provide!