Regex to permit files ending in ".jpg.jpg"

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Regex to permit files ending in ".jpg.jpg"

Postby Quicksilver » Mon May 17, 2004 10:16 am

I want to set a Regex to permit files with this ending: . jpg.jpg

At the moment I have the following entries in the Accept Filename Filter of the filter I use but these entries do not permit files ending in .jpg.jpg.

\.avi$
\.jpeg$
\.jpg$
\.mpeg$
\.mpg$

If I switch the Accept Filename Filter off for the filter I use then .jpg.jpg files get through. Here is an example of the sort of file name I am trying to get accepted: 108452138340A47BA779DC7jpg.jpg

I have tried \.jpg\.jpg but it doesn't work. Is this perhaps due to a quirk of Newsbin?
Quicksilver
Active Participant
Active Participant
 
Posts: 88
Joined: Wed Apr 07, 2004 4:46 pm

Postby dexter » Mon May 17, 2004 10:29 am

\.jpg$ should catch it. It won't care what's before this match weather it is another jpg or something else.

How many filters do you have enabled? We have had some reports that there is a limit to the number of filters you have configured before newsbin just starts ignoring them.

Also, filename filters are broken in version 4.3. I suggest you download 4.31 and see if the problem goes away.
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

Postby Quicksilver » Mon May 17, 2004 2:33 pm

dexter wrote:\.jpg$ should catch it. It won't care what's before this match weather it is another jpg or something else.


Yes, I would have thought so too but it definitely doesn't do it for me on NB 4.2.

dexter wrote: How many filters do you have enabled? We have had some reports that there is a limit to the number of filters you have configured before newsbin just starts ignoring them.


I have got 10 filters defined. These are the number of filter entries in that filter I use:

reject subject filter: 28 entries
accept subject filter: not enabled
reject filename filter: 13 entries
accept filename filter: 4 entries

Is anyone willing to test to see if they get the same result as I do?
Quicksilver
Active Participant
Active Participant
 
Posts: 88
Joined: Wed Apr 07, 2004 4:46 pm


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 0 guests