You can just enter the text into the pattern and it should match. Make sure to use the preview function so you can see the actual text as Hazel does:
https://www.noodlesoft.com/kb/previewing-your-rule/If it still doesn't work, email in the rule and a sample document and I can take a look at it.