Move image files to sub-folders based on a part of filename

Hi,
I have searched everywhere and tried a few ways but I can;t seem to figure this one out.
I have a thousands of scanned image files in the following name format "00642_04_newscan.jpg". So for each roll of film there are 36 image files (sometimes more, sometimes less) and they all go into one folder at the moment before being sucked into Capture One for processing.
I want to be able to get Hazel to watch the folder that contains all the image files and then move all images that match this pattern "00xxx_xx_newscan.jpg" and create a folder called "xxx" and then move the files inside that folder.
In the above example the folder would be named "642" which is film roll 642 and then inside that would be 00642_01_newscan.jpg, 00642_02_newscan.jpg, 00642_03_newscan.jpg, 00642_04_newscan.jpg etc.
Thanks for any help you can offer.
I have searched everywhere and tried a few ways but I can;t seem to figure this one out.
I have a thousands of scanned image files in the following name format "00642_04_newscan.jpg". So for each roll of film there are 36 image files (sometimes more, sometimes less) and they all go into one folder at the moment before being sucked into Capture One for processing.
I want to be able to get Hazel to watch the folder that contains all the image files and then move all images that match this pattern "00xxx_xx_newscan.jpg" and create a folder called "xxx" and then move the files inside that folder.
In the above example the folder would be named "642" which is film roll 642 and then inside that would be 00642_01_newscan.jpg, 00642_02_newscan.jpg, 00642_03_newscan.jpg, 00642_04_newscan.jpg etc.
Thanks for any help you can offer.