Using Hazel patterns over line breaks

Hi there,

I’m using Hazel to identify invoices and rename them with the invoice number. I would think to identify the number by having Hazel recognize the pattern “invoice no.” And then a string of numbers. However, on most of my documents the phrase “invoice no.” Is typically listed directly above the actual invoice number. Considering Hazel doesn’t handle line breaks well does anyone have a solution to this?

Thanks!

You should be able to match the entire pattern, then tokenize the actual number for use later in the rules for renaming.

If you are having trouble matching line breaks, use the file match preview tool in Hazel (click on the preview for a pop-up that shows the rule and matching content, if any), and select/copy the entire chunk of text surrounding the text string you want.

Usually that will grab hidden characters and line breaks and such, and by doing so using the Hazel match preview it ensures it’s whatever Hazel detects.

1 Like

I’ll try this. Thanks!!

Have you posted on the Hazel support form?

Doing so gives you direct access to the developer and leaves information for other people having the same problem.