Can Hazel scan for matches between file and folder names?

I know I can create a rule to move all files with “sierra” on their name to a folder called “sierra”.
But is there a way to make Hazel scan all files from a location and all folders from a different location and check if there is a “sierra” folder that matches a “sierra” .jpg and if so move the jpg to the folder?
Basically, I'm dealing with temporary files and folders (they get deleted and new ones are added with different names), so making permanent rules that will only match one temporary file to one temporary folder isn't really practical.
I have looked around in the forum and in the manuals, but I haven't found a way to do it.
Is that something Hazel can do? (I don't think it can, but I don't know that it can't. So I'm asking to confirm or in case I'm wrong).
If not, is it something that might be added in the future?
But is there a way to make Hazel scan all files from a location and all folders from a different location and check if there is a “sierra” folder that matches a “sierra” .jpg and if so move the jpg to the folder?
Basically, I'm dealing with temporary files and folders (they get deleted and new ones are added with different names), so making permanent rules that will only match one temporary file to one temporary folder isn't really practical.
I have looked around in the forum and in the manuals, but I haven't found a way to do it.
Is that something Hazel can do? (I don't think it can, but I don't know that it can't. So I'm asking to confirm or in case I'm wrong).
If not, is it something that might be added in the future?