multiline сontent match in pdf

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

multiline сontent match in pdf 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!
sashk
 
Posts: 8
Joined: Tue Oct 15, 2019 7:41 pm

Re: multiline сontent match in pdf 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.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: multiline сontent match in pdf 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!
sashk
 
Posts: 8
Joined: Tue Oct 15, 2019 7:41 pm


Return to Support