How does 'ends with' actually work?

Hi,
I'm trying to work out a rule that will sort scans of anything I upload to Dropbox according to the name I give it before upload. Specifically I was trying to sort 'recipes' into a Recipes folder. I would upload a scanned file in PDF format to Dropbox, with the name of the recipe followed by 'Rec'.
For example, 'Steak Diane Rec.pdf'
I set a rule that looked for all the following:
- has the extension 'pdf' (obviously without quotes);
- name ends with 'Rec'.
These should be moved to the Recipes folder and renamed to lose the 'Rec' at the end.
Hazel refused to do anything. If I removed the 'ends with' rule it worked fine. If I changed the 'ends with Rec' rule to 'contains Rec' it works, so I decided I'd have to use 'Recipe' and look for anything that contains 'Recipe' in the name as that's less likely to come up by accident than 'Rec'.
But why didn't the 'ends with' rule work? Surely 'ends with' doesn't include the extension as well?
I'm trying to work out a rule that will sort scans of anything I upload to Dropbox according to the name I give it before upload. Specifically I was trying to sort 'recipes' into a Recipes folder. I would upload a scanned file in PDF format to Dropbox, with the name of the recipe followed by 'Rec'.
For example, 'Steak Diane Rec.pdf'
I set a rule that looked for all the following:
- has the extension 'pdf' (obviously without quotes);
- name ends with 'Rec'.
These should be moved to the Recipes folder and renamed to lose the 'Rec' at the end.
Hazel refused to do anything. If I removed the 'ends with' rule it worked fine. If I changed the 'ends with Rec' rule to 'contains Rec' it works, so I decided I'd have to use 'Recipe' and look for anything that contains 'Recipe' in the name as that's less likely to come up by accident than 'Rec'.
But why didn't the 'ends with' rule work? Surely 'ends with' doesn't include the extension as well?