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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.