Page 1 of 1

multiline сontent match in pdf

PostPosted: Tue Apr 15, 2025 9:49 am
by sashk
Hi. I receive a statement, and attempting to extract a date but failed miserably.

PDF is not an image, and I can select text and copy/paste it, so text overlay is present.

There are two places where date is present.

1. There is a line which says "Here's your March 2025 bank statement." Tried to match with date, specified format, but still couldn't. Hazel even failed to detect Here's your in the text.

2. STATEMENT PERIOD
Feb 1 - Mar 31, 2025

How do I tell Hazel to look on the following line? Hazel was able to detect STATEMENT PERIOD, but newline \n didn't :(

Thanks!

Re: multiline сontent match in pdf

PostPosted: Wed Apr 16, 2025 9:21 am
by Mr_Noodle
Try previewing the file. Click on the red X for the Contents condition and it will show the text as Hazel sees it. I suspect it's not what you think it is internally.

For multiline, if you enter a space into your pattern, it will match any amount of whitespace, including newlines.

Re: multiline сontent match in pdf

PostPosted: Wed Apr 16, 2025 10:00 pm
by sashk
Thanks, didn't know about pressing red x.

March 2025 Here's your bank statement.
is what Hazel sees. Wow! very unexpected.
Thank you for your help!