Is it possible to extract the following string in a variable

just searching is sufficient.

I know that I am off-topic and not answering question, I just wonder if you have tried using noodlesoft’s Hazel to do this? (noodlesoft.com)

Hazel is pretty good at extracting text from files and then using that to decide what to do with them (which I am guessing is your next step.)