I got a very interesting scenario in Ask Sudeep section of BeyondRelational.com. Let me share the scenario first and then will explain how to go about it.
There is a folder which contains a number of files. The file name follows the following naming convention
List of files in the folder:
There can be 2 sets of files based on the alphanumeric part once with a and the other with b. From the above list we need to process just the following files:
As there is a break in the sequence for the file group “a” as a.3 is missing and similarly b.12 is missing so no files with larger numeric part will be processed.