Negating REGEX string, attachment

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
Nhaps
Posts: 252
Joined: Mon Sep 26, 2011 10:05 pm

Negating REGEX string, attachment

Post 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'
Last edited by Nhaps on Sat Feb 14, 2015 7:13 pm, edited 1 time in total.
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Negating REGEX string, attachment

Post by Jon »

I think it should be "AND NOT"

Jon
Sonny Software
Nhaps
Posts: 252
Joined: Mon Sep 26, 2011 10:05 pm

Re: Negating REGEX string, attachment

Post by Nhaps »

That did the trick, thank you!
Post Reply