All of the solutions presented so far are beautiful, but anyone with some experience in shell programming knows that parsing ls never a good idea and should be avoided . In this case, this does not actually apply, and we can assume that the file names follow a certain pattern, but this is a rule that should be remembered. More details here .
What you want can be much safer with GNU find - if you run the command in the directory where the files are located, it will look something like this:
find . -regextype posix-egrep -regex '\./[0-9]{5}[1-9][0-9]_[[:alpha:]]_[[:alpha:]]{2}.jpg$'
source share