Seems to be a glitch filtering par and par2 files.

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Seems to be a glitch filtering par and par2 files.

Postby dougm1 » Sat Jan 19, 2013 7:55 pm

About filtering using RegEx: I’m trying to filter and delete extraneous (for me) files in NZBs after loading into Newsbin, but before they begin downloading. It works pretty well, but here seems to be a glitch. My apologies if I’m simply overlooking something fundamental

With respect to video files, I don’t want to download .idx, .srr, .srs, or “sample” files. I followed Quade and dexter's suggestions, thank you, on using RegEx and the appropriate tools (like dubdubdub.regular-expressions.info and RegExBuddy). So, I can filter using Global “Subject” and/or “Filename” Reject to get rid of ALMOST everything I don’t want. The problem is with filtering “.par” and “.par2” files. The filter function in this case does not seem to apply to/function with “.par” and “.par2” files that contain “words/expressions” that are non-file extensions. Specifically, I am trying to knockout any and all files that contain anywhere the word “sample”. The RegEx filter “(?i)(sample)” works for non-par and non-par2 files, but the word “sample” is NOT recognized when in the subject or file name of a “.par” or “.par2” file and the files with the word "sample" in them end up either downloading or sitting idling in the “Downloading Files” queue. So, here are my filer expressions and results;

These RegEx’s:
(?i)(sample)
(?i)(sample)[.]par2
(?i)(sample)\.par2
(?i).*(sample)\.par2
(?i)([-]sample)[.]par2
(?i)(sample).[.]par2["]
Don’t work for (recognize/filter)
xxxx.S01E02.HDTV.x264-FTP-sample.par2
xxxx.s01e01.720p.hdtv.x264-ftp.sample-sample.par2
Etc.

Whereas these Regex’s:
(?i)(sample)
.*(idx|srr|srs)
Do work for (recognize/filter)
[122705]-[FULL]-[#a.b.teevee]-[ xxxx.S01E02.HDTV.x264-FTP ]-[06/41] - "xxx.s01e02.hdtv.x264-ftp.sample.mp4" yEnc
[122700]-[FULL]-[#a.b.teevee]-[ xxxx.S01E02.720p.HDTV.x264-FTP ]-[09/41] - "xxx.s01e02.720p.hdtv.x264-ftp.sample.srr" yEnc
"Sample.xxx.s03e016.1080p.x264-ftp.srs" yEnc
"xxx.hdtv.x264-lol.sample.mkv" yEnc

Am I overlooking a feature, function or improper RegEx construction?

One other thing: There appear to be about 15 flavors of Regular Expression Syntax; e.g., .NET, Java, Perl, Python, JGsoft, Ruby, etc., so which one should I use?
Thankx for your time.
User avatar
dougm1
Active Participant
Active Participant
 
Posts: 56
Joined: Sun Mar 21, 2010 3:08 pm

Registered Newsbin User since: 07/03/09

Re: Seems to be a glitch filtering par and par2 files.

Postby Quade » Sat Jan 19, 2013 9:34 pm

It's pretty close to perl syntax. It's PCRE is the name of the library I use.

PM me an example of something you can't filter. You really probably want to be using the subject filters for the filtering.

"sample" should be all you need in the subject reject filters.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 45003
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Seems to be a glitch filtering par and par2 files.

Postby Luggworm » Fri Feb 15, 2013 5:45 pm

Did you manage to resolve this? I have the same problem, I have a global subject reject and global filename reject of "sample*" this rejects and sends anything with sample in the title (xxx.sample.mkv/srs etc) to failed files list.

But not xxx.sample.par2 they start and then sit idle in the downloading files list. The only way to remove them is to manually delete from the downloading list.

I'm currently running 6.42

Thanks.
Luggworm
n00b
n00b
 
Posts: 5
Joined: Thu Feb 14, 2013 12:47 pm

Registered Newsbin User since: 03/27/09

Re: Seems to be a glitch filtering par and par2 files.

Postby Quade » Fri Feb 15, 2013 7:36 pm

I generated a filter profile. Then added

"sample.*[.]par2"

to the subject reject filter. Then loaded up some samples and it removed anything with "sample" from the view.

(?i)(sample)[.]par2
(?i)(sample)\.par2
(?i).*(sample)\.par2
(?i)([-]sample)[.]par2
(?i)(sample).[.]par2["]


These filters can't work. Well, they might work for "sample.par2" but, not "sample bla.par2".

Subject reject of "sample" is all you should need. I'm not able to test this in autodownload mode though. How about adding "sample" to the subject reject and let me know what happens.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 45003
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Seems to be a glitch filtering par and par2 files.

Postby dougm1 » Wed Feb 20, 2013 10:48 am

"sample" (sans "") doesn't work.
User avatar
dougm1
Active Participant
Active Participant
 
Posts: 56
Joined: Sun Mar 21, 2010 3:08 pm

Registered Newsbin User since: 07/03/09

Re: Seems to be a glitch filtering par and par2 files.

Postby Quade » Wed Feb 20, 2013 12:36 pm

I have yet to reproduce your issue so, I think there's something fundamentally different in how we're doing this.

I'll have to try again.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 45003
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 7 guests