I have a use case where I need to copy sharepoint files(2-3 file uploaded yearly) to Azure blob storage.
Each file that is uploaded on sharepoint contains a year. Eg : 17 XYZ 2024, 15 XYZ 2024, 23 XYZ 2023 (test)
While writing the files I have to give file names as XYZ_YEAR, YEAR fetched from the original file name. Eg : XYZ_2024, XYZ_2023
For the first 2 examples I am able to fetch year easily using this function - last(split(variables('file'),' ')). However, this does not work if we don't have year at the end as the uploaded file name is or will not be consistent.
I just want to fetch year from the file name irrespective of it's placement in the filename.
Thank you for the help in advance.
It's kind of urgent, any help would be appreciated 🙂