My situation is a bit odd. I have generated filenames inserted into a database that are to be matched with downloaded files later, however the downloaded files contain a random ID in the middle of their name.
If I include the wildcard characters on the generated filename that's inserted into the database, is there anyway to compare that against the actual downloaded file?
Generated name example: just-a-file-name-and-a-suffix.mp4
Actual downloaded file: just-a-file-name-51935-and-a-suffix.mp4
I have zero way to actually know what those 5 digits will be. I only know that there will be 5 digits. Ideally I'd insert the generated name into the database something like just-a-file-name-%-and-a-suffix.mp4
and use the LIKE
keyword in a SQL query but it doesn't work that way.
Is there anything I can do to solve this and get a match?