Content match; matching optional whitespace

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

Moderator: Mr_Noodle

Hi,

I love the content match feature in Hazel. One question- in the matches is is possible to match one or zero spaces? A bit like you can do in regexp?

I want to do this because sometimes I get PDFs with OCRed dates showing, e.g. "23July 2013" instead of "23 July 2013"

If I can't do this do I just need to build up two date matches, one with a space and one without and let Hazel fill the date in whichever it matches?

Thanks in advance.
ScreamingPict
 
Posts: 4
Joined: Wed Mar 06, 2013 8:09 am

Ooh- self reply. Just noticed that I can use the 'anything' element to match anything or nothing. Only shame is that it will also match non-whitespace and multiple characters.

Any way to just match one or zero spaces/whitespace?
ScreamingPict
 
Posts: 4
Joined: Wed Mar 06, 2013 8:09 am

A space will match any number of spaces but not zero. Will need to think about the repercussions of having it also match zero spaces.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support