Page 1 of 1

Negating REGEX string, attachment

Posted: Sat Feb 14, 2015 9:41 am
by Nhaps
First time trying REGEX: To find all references containing "Alpha 5" in the Abstract field I used the SQL string "abstract REGEX 'Alpha 5' " in a SQL smart group. To negate the string I used "NOT abstract REGEX 'Alpha 5' but got partial results. Most probably because this syntax does not account for empty abstract fields. So I used "NOT allFields REGEX 'Alpha 5' " and got what I wanted. I hope I am doing this right.

Now, to find all references that do not have 'Alpha 5' in the abstract and DO NOT have attachments to them, I tried this but did not work (got error message SQL Error: line 2:1: unexpected token: NOT)

NOT varCharField REGEX '[^0-9\t]'
NOT allFields REGEX 'Alpha 5'

Re: Negating REGEX string, attachment

Posted: Sat Feb 14, 2015 12:26 pm
by Jon
I think it should be "AND NOT"

Jon
Sonny Software

Re: Negating REGEX string, attachment

Posted: Sat Feb 14, 2015 7:22 pm
by Nhaps
That did the trick, thank you!