rss filter for shows with generic names like house

Feel free to talk about anything and everything in this board.
Post Reply
newbiefly
Newbie
Newbie
Posts: 2
Joined: July 21st, 2011, 7:18 am

rss filter for shows with generic names like house

Post by newbiefly »

so on my recent new install of ubuntu i forgot to copy sabnzbd.ini and have been rebuilding my filters and have recently discovered a nice little regex filter i think you guys might find useful. see the problem is i like shows with generic names like house, mad, and treme but when you accept house you don't just get house you get tyler perry's house of pain, clean house, this old house, ALL the different kinds of real hosewives, etc. but all the house episodes i want are format "house S06E09..." so in my regex i use the carat(^) to denote primary location in the string followed by SXXEXX to get:

Code: Select all

re:^house.S[0-9][0-9]E[0-9][0-9]*
its been very effective for other shows too:

Code: Select all

re:^mad.S[0-9][0-9]E[0-9][0-9]*
re:^episodes.S[0-9][0-9]E[0-9][0-9]*
re:^treme.S[0-9][0-9]E[0-9][0-9]*
re:^extreme.cuponing.S[0-9][0-9]E[0-9][0-9]*
re:^top.gear.S[0-9][0-9]E[0-9][0-9]*
re:^top.gear.[0-9][0-9]*
see i like british top gear but don't like top gear us or top gear au but need an extra rule because sometimes format is "top gear S17E03" other times "top gear 17x02"

here is a little filter i've worked out for new shows:

Code: Select all

Reject re:^ice.pilot*
Accept *pilot*
Accept s01e01
Accept s00e00
try and use it as an rss filter for some of your favorite shows and let me know how it works for you or if you have any better ideas
minimeh
Newbie
Newbie
Posts: 34
Joined: March 26th, 2010, 12:42 pm

Re: rss filter for shows with generic names like house

Post by minimeh »

For me, Treme was the challenge that made me explore regex in filters. But using your House example, I would do something like:

Code: Select all

re:^house[ \.]S[0-9]+E[0-9]+
I like this a bit better because all of these patterns will match:

Code: Select all

House S07E22 720p HDTV X264
House.S07E22.720p.HDTV.X264
House S7E3 720p HDTV X264
House.S7E3.720p.HDTV.X264
House S007E022 720p HDTV X264
House.S007E022.720p.HDTV.X264
The difference is, instead of accepting any character after "house", this only accepts a space or a period (not a real big deal). But the "S[0-9]+E[0-9]+" construct accepts only an "S" followed by one or more digits followed by "E" followed by one or more digits. This way, if there is no leading 0 or more than one leading 0, or we get into 3-digit episode numbers (see The Daily Show With Jon Stewart), we still get a hit.

By the way, the regex "re:^house.S[0-9][0-9]E[0-9][0-9]*" may not be exactly what you think. The expression "E[0-9][0-9]*" is interpreted as an "E" followed by one or more digits. Within a regex expression, the star doesn't mean match the rest of the string (which I'm only guessing that you had in mind), but rather zero or more of the previous character, which in this case is the set of digits. "E[0-9][0-9]*" and ""E[0-9]+" mean pretty much the same thing.

Just saying, because regular expressions are a lot of fun to play around with.
newbiefly
Newbie
Newbie
Posts: 2
Joined: July 21st, 2011, 7:18 am

Re: rss filter for shows with generic names like house

Post by newbiefly »

thanks for the input, minimeh. i really appreciate it. i thought i would need to define each digit separately. regular expressions are a lot of fun to play around with. the more i learn the less i know.
Post Reply