What setup to not download indexes of pictures?

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

What setup to not download indexes of pictures?

Postby yungblud » Tue Oct 21, 2003 10:04 pm

I do not want to download index jpegs. How do I set up the filters and what expressions do I use in the filter profile?

One thing I need to be careful about is that some sets of postings say in their subject "see index". I want to download these postings and not to reject them.

Do I just do this?

(1) add "idx" to the Reject Subject Filter
(2) uncheck Accept Subject filter
(3) add "\.idx" to Reject filename filter
(4) uncheck Accept Filename filter

Is there also a way to reject all files which start with an exclamation sign "!"? These are mostly indexes and I would like not to save them.
User avatar
yungblud
Seasoned User
Seasoned User
 
Posts: 168
Joined: Fri Sep 19, 2003 12:29 pm

Postby dexter » Wed Oct 22, 2003 12:54 am

For performance reasons, it is best to try to catch this stuff in a subject filter instead of a filename filter. Subject filters can be applied locally, but filename filters can't be applied until NewsBin actually starts downloading the post, to get the real filename. If there is a match, then NewsBin dumps the connection to stop receiving the file, and then establishes a news connection. That takes time and, on some servers, may put you over the connection limit if the server is slow to acknowledge the lost connection.

But to answer your question, try this:

Reject Subject filters:

" !.+\.(jpg|jpeg)" <-- leading space
"index[0-9]+\.(jpg|jpeg)" Should catch index01.jpg but let "see index" go by.

Reject Filename filter:

"^!.+\.(jpg|jpeg)" <-- the ^ sign anchors to beginning of string

Don't include the quotation marks, they are there just to show beginning and end of the RE.
User avatar
dexter
Site Admin
Site Admin
 
Posts: 9514
Joined: Fri May 18, 2001 3:50 pm
Location: Northern Virginia, US

Registered Newsbin User since: 10/24/97


Return to Regular Expressions

Who is online

Users browsing this forum: Google [Bot] and 2 guests