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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.