The code you posted is NOT checking for digits in any specific location in the filename.
It is checking if there are specific strings of digits that appear between underscores.
If you are having trouble explaining the structure of the filenames you need to parse then post multiple examples and perhaps someone else can help you understand the pattern.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.