Filter based on size and subject?

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Filter based on size and subject?

Postby Moondawgie » Fri Nov 02, 2001 6:14 pm

Is there a filter that will work with NewsBin which will filter all attachments between 1 and 100 lines in size for which the strings "."000 or "."nfo doesn't appear in the subject line? I'm looking for something matching the following filter which I presently use with Dazzler's Agent 32:

[1,100] and not Subject: {\.000|\.nfo}

I realize that NewsBin uses file size rather than the number of lines.

Thank you.
Moondawgie
 

RE: Filter based on size and subject?

Postby dexter » Wed Nov 07, 2001 4:30 am

You would enter filters in two different places. First, determine what 100 lines come out to be in terms of file size on average and enter that as the Minimum File Size in the File Size Filters. Then, use the RegEx (\.nfo|\.000) as a Subject Filter.
User avatar
dexter
Site Admin
Site Admin
 
Posts: 9511
Joined: Fri May 18, 2001 3:50 pm
Location: Northern Virginia, US

Registered Newsbin User since: 10/24/97

RE: Filter based on size and subject?

Postby corsairius » Sat Jan 19, 2002 3:26 am

>You would enter filters in two
>different places. First, determine
>what 100 lines come out
>to be in terms of
>file size on average and
>enter that as the Minimum
>File Size in the File
>Size Filters. Then, use
>the RegEx (\.nfo|\.000) as a
>Subject Filter.


Wait a minute, shouldn't it be (\.nfo)|(\.000)? Or is the above the correct grouping? I was never sure as to the use of the pipe character in RegExp.

thanks,
--Joe.
corsairius
Active Participant
Active Participant
 
Posts: 57
Joined: Mon Jan 07, 2002 1:59 pm

Registered Newsbin User since: 04/15/03

RE: Filter based on size and subject?

Postby dexter » Mon Jan 21, 2002 11:23 pm

It works either way. The groupings mean different things in Perl because a match inside parens will be assigned to an internal variable. My way would give one variable, your way would give two. In NewsBin, it doesn't matter. Give it a try.
User avatar
dexter
Site Admin
Site Admin
 
Posts: 9511
Joined: Fri May 18, 2001 3:50 pm
Location: Northern Virginia, US

Registered Newsbin User since: 10/24/97

RE: Filter based on size and subject?

Postby corsairius » Tue Jan 22, 2002 4:15 am

I like your way better.

thanks,
--Joe.
corsairius
Active Participant
Active Participant
 
Posts: 57
Joined: Mon Jan 07, 2002 1:59 pm

Registered Newsbin User since: 04/15/03


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 2 guests