Here's how you could do it:

And here's a snippet for the code:
LOOP FOREACH CurrentItem IN Files
IF Contains(CurrentItem.NameWithoutExtension, -12345, False) THEN
NEXT LOOP
END
END
But you could also use an "Ends with" operator in the If condition, if the string is expected to always be at the end of the file name:

-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.