Page 1 of 1

Content match; matching optional whitespace

PostPosted: Tue Dec 17, 2013 7:18 pm
by ScreamingPict
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.

Re: Content match; matching optional whitespace

PostPosted: Tue Dec 17, 2013 8:34 pm
by ScreamingPict
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?

Re: Content match; matching optional whitespace

PostPosted: Thu Dec 19, 2013 1:51 pm
by Mr_Noodle
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.