Page 1 of 1

Compound expressions?

PostPosted: Mon Jul 16, 2001 9:37 pm
by macraig
Is it possible to construct compound expressions for the new regexp subject and file filters? In particular, is it possible to construct an expression that would look for multiple words in the subject, IN ANY ORDER?

In other words, for example:

(mother)&(daughter)&(sex)

I gather that ORing is possible using "|", but are there other supported conjunctions (AND, NAND, NOT, NOR, XOR, etc.)?

Mark Craig

RE: Compound expressions?

PostPosted: Tue Jul 17, 2001 11:30 am
by dexter
I don't know of a single line RegEx to find multiple sets of strings in any order. You can accomplish this by entering each string as a separate filter and NewsBin will apply each one in sequence. That is probably the best bet.

RE: Compound expressions?

PostPosted: Thu Jul 19, 2001 5:58 am
by macraig
>You can accomplish this by entering each string
>as a separate filter and NewsBin will apply each one
>in sequence.

That won't work for my example or what I had in mind, though maybe I wasn't clear about it. Your solution would reject any subject that has AT LEAST ONE of the listed words, but what I had in mind was only rejecting subjects that had ALL the words BUT in any order.

Hmmm... wait a minute. Does NB "partially evaluate" each list and skip all the remainder when an expression in the list matches? Or... does NB continue to test all remaining expressions in the list, even after a match? Or to put it another way, is it possible to have multiple expressions match on the same subject/filename?

I've been assuming partial evaluation, but your suggested solution hints that maybe I've assumed wrong?

Mark Craig

RE: Compound expressions?

PostPosted: Thu Jul 19, 2001 9:36 pm
by dexter
No, you're right, that wouldn't work. If you wanted order to matter for 3 different elements, you'd have to enter 9 different filters to catch all the combinations.

If anyone else has any ideas, feel free to pipe up.