Sigh

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Sigh

Postby Sandman » Fri Sep 03, 2010 3:06 pm

I finally get around to trying to use Newsbin filters and I have to learn Regular Expressions to use it? :? Are you kidding me? I just want to filter out a few things and I have to learn practically a new language just to do that? Why didn't you guys just use Windows wild cards or something?
Sandman
Seasoned User
Seasoned User
 
Posts: 197
Joined: Sun May 11, 2008 10:18 pm

Registered Newsbin User since: 05/07/08

Re: Sigh

Postby Quade » Fri Sep 03, 2010 3:37 pm

If you want to filter something out...just enter it. "anal" or "tigbitties" for instance will match anywhere in the subject if you add it to a subject accept or reject filter. German pron is some foul shit so, you might want to enter "German" in the subject reject filter. It's the same thing as "*german*". There's no case in the filters so, "German" is the same a "german". You don't need to get complicated till you want to filter something complicated. "german.*pooh" will accept any subject that has "german" and "pooh" in it in that order.

Adding multiple lines of filter is like ORing

If you add two entries for example
"Japan"
"German"

It'll match/reject if either or both words appear.

The only complication is that some characters have special meaning.,

Say you want to match or reject an extension

[.]jpg or \.jpg Will match any ".jpg"

You know when you enter something in the find box of a post list? That's regular expressions too. In fact you can test your expressions there.

Subject filters apply to the subjects, like in a post list. Filename filters apply AFTER download.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44999
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Sigh

Postby Sandman » Fri Sep 03, 2010 4:46 pm

Ok, I was under the impression I had to use special expressions. Thank you.
Sandman
Seasoned User
Seasoned User
 
Posts: 197
Joined: Sun May 11, 2008 10:18 pm

Registered Newsbin User since: 05/07/08

Re: Sigh

Postby Quade » Fri Sep 03, 2010 5:23 pm

You can do some really complicated things with regular expressions but, you don't have to.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44999
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Sigh

Postby beany » Tue Sep 04, 2012 11:56 am

Well Ive had newsbin for about 6 months now an still haven't a clue how to use it. However this post is the nearest Ive gotten to finding out how to exclude something (which is what I mostly want).
nearest maybe but not actually to do it. Where is this accept or reject filter you speak of? Im using ver 6 and there is just one line to type into that says search. I Would really like to use NB and rave about it because I am massively unhappy with NL support however NL is really really easy to use and for me NB is really reallt not !
Thnx
Last edited by beany on Tue Sep 04, 2012 12:19 pm, edited 1 time in total.
beany
Active Participant
Active Participant
 
Posts: 84
Joined: Sat Apr 14, 2012 2:58 pm

Re: Sigh

Postby Quade » Tue Sep 04, 2012 12:08 pm

Say you wanted to exclude "german". How would you do that in NL?
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44999
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Sigh

Postby beany » Tue Sep 04, 2012 12:17 pm

Quade wrote:Say you wanted to exclude "german". How would you do that in NL?



-german or not german
beany
Active Participant
Active Participant
 
Posts: 84
Joined: Sat Apr 14, 2012 2:58 pm

Re: Sigh

Postby Quade » Tue Sep 04, 2012 1:01 pm

In search it works the same way. It's not clear what you're looking at.

- If you want to filter "german" out of everything, options menu/filters/Global filter and add "german" to the "Subject Reject" section.

- If you're using NZB's then in the NZB Options, you an pick a filter to filter out files from NZB's. You could just pick "Global" if that's where you added the "german" filter too. I have a filter called "NZB Filters" that filters the few NZB's I use.

- When searching using the search tab, you can include "-german" in the search string to exclude german.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44999
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Sigh

Postby sLiveX » Tue Sep 04, 2012 1:34 pm

Hey Quade,

thanks for your Answer, but this doesn't work.

Here an example:

Searching for "Santa Clause" without quotes. Now when i want exclude the file type ".mp3" , i type (all without a quote) "-.mp3" or "-mp3" etc. but NB shows now only .mp3 Files and excludes everything else or it shows nothing.

I'm using 6.40 RC2
sLiveX
Occasional Contributor
Occasional Contributor
 
Posts: 12
Joined: Sun Dec 19, 2010 8:32 am

Registered Newsbin User since: 12/03/09

Re: Sigh

Postby dexter » Tue Sep 04, 2012 2:27 pm

Where are you entering this? In the Search tab to perform an Internet Search? Or do you have it set to Local Search? If you just type in a search term and there is already content in the list, it gets applied immediately as a filter to the current contents using RE's not boolean. If you enter "santa clause -mp3" (without the quotes) and click the Search button to perform an Internet Search then it will return only results containing the words santa and clause but not mp3.
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

Re: Sigh

Postby sLiveX » Tue Sep 04, 2012 4:07 pm

I'm entering this in the search bar after i performed an Internet Search. I'm trying to filter the results of the Internet Search out (file types, words in the Subject etc) that i don't need or let NB show me only Search Results with a specific Subject.

I have really no clue how to use the Regular Expressions right. I love Newsbin but its so hard (inconvenient) to filtering with RE's. It would be so much easier to filtering the Internet Search Results like another competing product which begins with N and ends with R.

There are 2 Fields: One for searching mostly the same way like NB and a second field for filtering the Results.

With a second Filter field we could filter the results of the search for Santa for example this way: -mp3 +mkv +reindeer -daniel77upload etc.

Its much more comfortable for noob users like me :mrgreen: .
sLiveX
Occasional Contributor
Occasional Contributor
 
Posts: 12
Joined: Sun Dec 19, 2010 8:32 am

Registered Newsbin User since: 12/03/09

Re: Sigh

Postby dexter » Tue Sep 04, 2012 4:32 pm

Why don't you perform the first search using boolean expressions then you can filter in subsets of the results afterwards. You don't need to know RE, only if you want to do complicated things. If you just type some text after you perform the initial search, it'll show all results matching whatever you entered.
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

Re: Sigh

Postby beany » Tue Sep 04, 2012 5:29 pm

dexter wrote:Why don't you perform the first search using boolean expressions then you can filter in subsets of the results afterwards. You don't need to know RE, only if you want to do complicated things. If you just type some text after you perform the initial search, it'll show all results matching whatever you entered.


Thanks , I found the tabs you mention and can see how that works now. I also confirm that -german will work in the initial internet search. So what's left is to understand how to get -german result from the same single search bar once the initial search has been done. ie without using the the whole filter window setup
Thx
beany
Active Participant
Active Participant
 
Posts: 84
Joined: Sat Apr 14, 2012 2:58 pm

Re: Sigh

Postby Quade » Tue Sep 04, 2012 6:59 pm

Already told you how to do it. Global Filter. RE's don't support negation very well. The other option is search for, then select and Shift-Delete to make the visible results go away from the current search results.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44999
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Sigh

Postby sLiveX » Wed Sep 05, 2012 1:24 am

dexter wrote:Why don't you perform the first search using boolean expressions then you can filter in subsets of the results afterwards. You don't need to know RE, only if you want to do complicated things. If you just type some text after you perform the initial search, it'll show all results matching whatever you entered.


That definitly works verry well, but thats not the Point Dexter :). Here an Example for a Search and why that would be much easier to handle:

Searching for (it doesnt exist really): Santa Clause S08 720p dutch

The Result is often verry mixed and i dont want performing X extra Internet searches to Exclude the unwanted entries. And when i want to download the whole season s08e01 - s08e25 its going more and more difficult:

"Mixed" Result:

Code: Select all
Dr.SantaClause.S08E01.DUTCH.DUBBED.DL.720p.ChrisHD.h264-tmasHD- (02/40) - "tmashd-santa-s08e01-720p.nfo" yEnc
Dr.SantaClause.S08E01.DUTCH.DUBBED.DL.720p.ChrisHD.h264-tmasHD- (33/40) - "tmashd-santa-s08e01-720p.sfv" yEnc
Dr.SantaClause.S08E01.DUTCH.DUBBED.DL.720p.ChrisHD.h264-tmasHD- (34/40) - "tmashd-santa-s08e01-720p.rar" yEnc
Clause.the.Red.Nose.ReinPig.1080p - (01/80) - "clause-s01e01-1080p.rar" yEnc
Dr.SantaClause.S08E01.DUTCH.DUBBED.DL.720p.ChrisHD.h264-tmasHD- (34/40) - "cover.jpg" yEnc
Clause.the.Red.Nose.ReinPig.1080p - (02/80) - "clause-s01e01-1080p.sfv" yEnc
Clause.the.Red.Nose.ReinPig.1080p - (03/80) - "clause-s01e01-1080p.nfo" yEnc


... and so on. Now imagine there are 1000 other Entries and i have to watch out what i dont need, e. g. "nfo", "1080p". Now i have to perform an extra Search with -nfo -1080p. Now i see some Subjects which i dont need "pr0nmaster4fuznet" - another manual internet search... and so on. Do you understand what my Point is? If you could filter thes things instantly out (like the RE-Method but with boolean), the workflow would in my opinion, far better.

It's just a suggestion, you both could think about it :).
sLiveX
Occasional Contributor
Occasional Contributor
 
Posts: 12
Joined: Sun Dec 19, 2010 8:32 am

Registered Newsbin User since: 12/03/09

Re: Sigh

Postby Quade » Wed Sep 05, 2012 3:11 am

Yeah but, you don't have to do another search. I understand why it's confusing. I'll explain it in more detail.

1 - You do a search for "santa clause" and get 2000 results

2 - You click nuke button, the one to left of the "Santa clause" text clear it then type in "S08" else DON'T hit entry.

3 - From the results you already downloaded, Newsbin will filter down and only show "S08". As long as you don't hit "enter" or the magnifying glass, this isn't another search. You're just filtering through the results you already got.

"S08.*720P" - match "S08" and "720p" ".*" just means "anything in between"

You can also click the top column for subject and sort all the subjects. That'll get the related files combined together. You can also set a minimum size and that ALSO doesn't cost another search.


Dex and I discussed this and I think in the next version, not 6.40. I'm going to split these functions so, search finding within the search data is more clear.

- Basically a "Search" means "pull information from the search into newsbin".

- Then you do a find within this data. As long as you don't hit enter again, it's not another search.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44999
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Sigh

Postby sLiveX » Wed Sep 05, 2012 4:21 am

Hey Quade,

thanks for your Answer. I have understood that so far, thank you verry much. But wouldn't that much less confusing to filtering the Search Results out just via Boolean instead of RE's?

Thanks! :)
sLiveX
Occasional Contributor
Occasional Contributor
 
Posts: 12
Joined: Sun Dec 19, 2010 8:32 am

Registered Newsbin User since: 12/03/09

Re: Sigh

Postby Quade » Wed Sep 05, 2012 11:42 am

SliveX came to IRC and we figured this out.

[SearchTab]
EnableFilters=1

If you add this to the NBI the filters work. I've since fixed it in the RC3 which will be out in a day or so

Thanks.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44999
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 24 guests