Page 1 of 1

How to search (S1 and S2) and (s3 or s4)

PostPosted: Tue May 18, 2010 3:33 pm
by Traveler2530
How to search for:

(string1 AND string2) AND (string3 OR string4)

Examples that find hits(in any order):

pebbles fred barney
wilma fred barney
pebbles fred wilma barney

Another search:

(string1 AND string2) OR (string3 AND string4)
(barney AND fred) OR (wilma AND pebbles)

Example hits would have(in any order):
fred barney
pebbles wilma
barney fred
pebbles wilma

Thanks in advance!

PostPosted: Tue May 18, 2010 5:13 pm
by dexter
Regular Expressions can't really be compared to binary searches in some cases. To get close to this:

(string1 AND string2) AND (string3 OR string4)

Would look something like this

string1.*string2.*(string3)?(string4)?

But order is important. So do to this:

pebbles fred barney

In any order would be a long RE. You'd have to list all the combinations manually.

Now if you set up a filter profile, you could enter each keyword on a different line in the Add Filters screen and then Newsbin will AND them all together so, they will work in any order.

To do this:

(string1 AND string2) OR (string3 AND string4)

Try

(string1.*string2)?(string3.*string4)?

PostPosted: Tue May 18, 2010 8:50 pm
by Traveler2530
Thanks, I'll use the expressions and give the filter approach a try as well.

So for (fred AND barney) AND (wilma OR pebbles)

can I put fred barney in the filter and put (string3? string4?) in the search field?

PostPosted: Tue May 18, 2010 11:16 pm
by dexter
Yeah, that should work. Best thing to do is play with it and see what happens.

PostPosted: Wed May 19, 2010 12:00 am
by Traveler2530
It appears the filters work only when searching subjects from "find" in the view messages window. I need to search thousands of groups.

From my tests, I must use a regex with the logic for four strings to search all of the groups at once.

Is there a source of simple regex expressions (like we discussed earlier fred/barney/wilma/pebbles example) free on the 'Net? I looked at several I found with google, but they were too complicated for a newbie.

thanks

PostPosted: Wed May 19, 2010 8:43 am
by dexter
Try http://www.regular-expressions.info/reference.html. We point to it from our own help pages.