Pattern matching/regex type question

Dear Hazel Community
I'm trying to raise my Hazel game and am uncertain if the following is possible (there seem to be some parallels with this thread https://www.noodlesoft.com/forums/viewtopic.php?f=2&t=9711&p=28881&hilit=regex#p28881 implying this may not be currently possible but might become so with anticipated enhancements?
I receive large numbers of documents relating to multiple projects. Projects have a consistent numbering format (four digits) and there are some reasonably consistent file naming conventions, but I am receiving incoming documents on multiple projects at any one time.
What I would like to do is sort incoming documents into a folder matched on the four digit number, then subfolders e.g. for the various stakeholders in the project. So "1234 external stakeholders report" would file into /1234 project/1234 stakeholder contributions
Whilst I can pattern match on "any four digit number at the start of a filename" how do you extract the *actual* four digit number to tell Hazel specifically into which of the several project folders this should be filed?
As supplemental questions:
1. what would be the most efficient way to handle the subfolder sorting: put complex nested watch rules on the downloads folder or a two-step process where the subfolder-sorting watch rules apply to the 1234 project folder itself? and
2. if the latter are there efficient/reliable ways to clone these rules to apply to new project folders as these get created?
Thanks!
Rob
I'm trying to raise my Hazel game and am uncertain if the following is possible (there seem to be some parallels with this thread https://www.noodlesoft.com/forums/viewtopic.php?f=2&t=9711&p=28881&hilit=regex#p28881 implying this may not be currently possible but might become so with anticipated enhancements?
I receive large numbers of documents relating to multiple projects. Projects have a consistent numbering format (four digits) and there are some reasonably consistent file naming conventions, but I am receiving incoming documents on multiple projects at any one time.
What I would like to do is sort incoming documents into a folder matched on the four digit number, then subfolders e.g. for the various stakeholders in the project. So "1234 external stakeholders report" would file into /1234 project/1234 stakeholder contributions
Whilst I can pattern match on "any four digit number at the start of a filename" how do you extract the *actual* four digit number to tell Hazel specifically into which of the several project folders this should be filed?
As supplemental questions:
1. what would be the most efficient way to handle the subfolder sorting: put complex nested watch rules on the downloads folder or a two-step process where the subfolder-sorting watch rules apply to the 1234 project folder itself? and
2. if the latter are there efficient/reliable ways to clone these rules to apply to new project folders as these get created?
Thanks!
Rob