Searching with the alternation and both Subject & Poster

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Searching with the alternation and both Subject & Poster

Postby lordhog » Sun Sep 20, 2015 6:58 am

Hello,

I have a two part question regarding RegEx in Newsbin. I am trying to devise a search pattern that searches for multiple items so I am using the alternation metacharacter. So long as I am using a single element (e.g., "(America|Europe)") for each alternation the search works okay. When I use a two word alternation the search fails (e.g., "(America|Indo China)") or "(America|Indo.China)"). If I perform a search for the element two element by itself (e.g., "(Indo China)") then the search works fine. If I perform the same searching using an online RegEx tester (e.g., http://www.regexr.com/) then my RegEx works fine. How do I get my RegEx to work correctly within Newsbin's subscription search?

The second question I have it, how can I search against both the subject line and the poster? More often, I want to search for a poster, but exclude posts that might have certain content in the subject line.

Any help is greatly appreciated.

Regards,
Mark
lordhog
n00b
n00b
 
Posts: 5
Joined: Fri Sep 02, 2011 3:57 am

Registered Newsbin User since: 11/25/09

Re: Searching with the alternation and both Subject & Poster

Postby Quade » Sun Sep 20, 2015 9:30 am

How do I get my RegEx to work correctly within Newsbin's subscription search?


Newsbin's internet search doesn't use Regex. It's more like a google search.

"word word -notword"

You can apply a regex filter after the search though using a search profile or typing it in. In your case, I'd probably search for the poster, then apply the regex to the subject after the fact.

Spaces are a problem in the current regex. Newsbin interprets them as an "and" so you might need to do "Indo.*China" to remove any spaces. "Indo.China" would work too if you know only one character separates them.

The watch lists don't currently do it but supporting a combination of regex on subject and search on poster, is probably the next thing I'm going to implement. I use "poster search" watch lists to collect up everything a particular poster posts into a dedicated list, then load up that watch list and use regex on the subjects of the results.
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: Searching with the alternation and both Subject & Poster

Postby lordhog » Sun Sep 20, 2015 9:46 am

Quade,

Thanks for the info. Are there plans for Newsbin's internet search to use RegEx in the future? I don't use Watchlist I only perform a search every once in a while and having a watchlist seems like a good way to burn through my monthly searches quickly.

Regards,
Mark
lordhog
n00b
n00b
 
Posts: 5
Joined: Fri Sep 02, 2011 3:57 am

Registered Newsbin User since: 11/25/09

Re: Searching with the alternation and both Subject & Poster

Postby dexter » Sun Sep 20, 2015 12:48 pm

No, Internet Search is a boolean search. The majority of users are not familiar with regular expressions. We have no plans to support Regular Expressions through that interface.
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: Searching with the alternation and both Subject & Poster

Postby Quade » Sun Sep 20, 2015 2:30 pm

Thanks for the info. Are there plans for Newsbin's internet search to use RegEx in the future? I don't use Watchlist I only perform a search every once in a while and having a watchlist seems like a good way to burn through my monthly searches quickly.


If you search once a day, you basically do (30 * number of watch lists) searches a month + whatever manual searches you do. Searches don't roll over so, it's "use it or lose it". The search results accumulate so, you don't need to re-do a search to see the results of all the periodic searches. They remain in the watch list till you purge them.

For manual searches, it's probably a good idea to do what I'm suggesting, which is search on poster, then subject filter. You can create an arbitrarily complicated filter profile with regexes.
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: Searching with the alternation and both Subject & Poster

Postby lordhog » Sun Sep 20, 2015 8:23 pm

Thanks, Quade and Dexter. Perhaps, one day, Internets searches might support RegEx said the dimly lite star in the heavens. ;-)
lordhog
n00b
n00b
 
Posts: 5
Joined: Fri Sep 02, 2011 3:57 am

Registered Newsbin User since: 11/25/09


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 20 guests