Regex RSS filter

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Ramrodian
Newbie
Newbie
Posts: 11
Joined: October 11th, 2009, 3:56 am

Regex RSS filter

Post by Ramrodian »

Either I'm too tired or I'm just haven't enough brain to think straight.
I'm trying to figure out how regular expressions work.

I was using just standard word filtering, but it wasn't really satisfying.
This is for mostly TV shows.
I'm trying to use regular expressions now and it seem to match my filters, but only if it is a one word show.
For example:
re:^Merlin
re:^Desperate?Housewives

It match: Merlin.s0?x?? and Merlin.Secrets* but it doesn't seem to match Desperate.Housewives.*

Not even if I use re:^Desperate*Housewives as the filter string.
Am I doing anything wrong?

Another question is that I've tried to figure out for a day now, if there is a way to use regular expressions in a easy way to accept one thing in a releasename but reject another, for example for Merlin.
I only want the regular show of Merlin, but not the Merlin.Secrets.And.Magic show, is there a way to use the same filter line to filter the both at the same time, if you understand what I mean. Or do I need to make a seperate reject filter for the Secrets And Magic releases?
c0ld
Newbie
Newbie
Posts: 48
Joined: March 30th, 2009, 6:28 am

Re: Regex RSS filter

Post by c0ld »

Ramrodian wrote: Either I'm too tired or I'm just haven't enough brain to think straight.
I'm trying to figure out how regular expressions work.

I was using just standard word filtering, but it wasn't really satisfying.
This is for mostly TV shows.
I'm trying to use regular expressions now and it seem to match my filters, but only if it is a one word show.
For example:
re:^Merlin
re:^Desperate?Housewives

It match: Merlin.s0?x?? and Merlin.Secrets* but it doesn't seem to match Desperate.Housewives.*

Not even if I use re:^Desperate*Housewives as the filter string.
Am I doing anything wrong?
? and * don't mean wildcards, they stand for 'consecutive instances of the previous group or character' which in this case would be 'DesperateeHousewives'.
. and .* are the wildcards. A single period is for a single wildcard, and the single period plus the 'consecutive instances' qualifier obviously means more than one wildcard. So try this;
re:^Desperate.Housewives.*
Another question is that I've tried to figure out for a day now, if there is a way to use regular expressions in a easy way to accept one thing in a releasename but reject another, for example for Merlin.
I only want the regular show of Merlin, but not the Merlin.Secrets.And.Magic show, is there a way to use the same filter line to filter the both at the same time, if you understand what I mean. Or do I need to make a seperate reject filter for the Secrets And Magic releases?
I would reject the longer name first, then accept the short name later. Just be very specific with the first reject filter.
Ramrodian
Newbie
Newbie
Posts: 11
Joined: October 11th, 2009, 3:56 am

Re: Regex RSS filter

Post by Ramrodian »

c0ld wrote: ? and * don't mean wildcards, they stand for 'consecutive instances of the previous group or character' which in this case would be 'DesperateeHousewives'.
. and .* are the wildcards. A single period is for a single wildcard, and the single period plus the 'consecutive instances' qualifier obviously means more than one wildcard. So try this;
re:^Desperate.Housewives.*

I would reject the longer name first, then accept the short name later. Just be very specific with the first reject filter.
Thank you!
And for Merlin I made it easy for me, I used re:^Merlin.S0* instead  ;D
c0ld
Newbie
Newbie
Posts: 48
Joined: March 30th, 2009, 6:28 am

Re: Regex RSS filter

Post by c0ld »

Thank you!
And for Merlin I made it easy for me, I used re:^Merlin.S0* instead  ;D
Careful, re:^Merlin.S0* would match Merlin.S0, Merlin.S00, Merlin.S000, etc. Whereas re:^Merlin.S0.* would match Merlin.S01, Merlin.S02, Merlin.S03, etc. I doubt it'll actually matter though.
Post Reply