Thread View: news.software.readers
8 messages
8 total messages
Started by Zars
Sun, 02 May 2010 01:05
Xnews score file / regex help request
Author: Zars
Date: Sun, 02 May 2010 01:05
Date: Sun, 02 May 2010 01:05
21 lines
1704 bytes
1704 bytes
Hello, I'm attempting to write a scoring expression for my Xnews score.ini and am not having any success, and I'm even sure what I'm doing wrong. I've read Luu's scoring/regex section, and have also done some fruitless poking around on the web. Perhaps I'm just obtuse. Anyway, what I would like is a filter that kills the dollar sign - $ - anywhere in a subject, either by itself, or part of a price, or part of any other string, regardless of whether it appears once or multiple times. I know in regex the dollar sign is a special character, but this, as far as I can tell, does absolutely nothing, and I don't know why: Subject: \$ Any regex gurus out there want to share their expertise? Many thanks!
Re: Xnews score file / regex help request
Author: Mike Dee
Date: Sun, 02 May 2010 03:08
Date: Sun, 02 May 2010 03:08
39 lines
2773 bytes
2773 bytes
Zars <azoblue@myrealbox.DOTcom> wrote:
[...]
> Anyway, what I would like is a filter that kills the dollar sign -
> $ - anywhere in a subject, either by itself, or part of a price, or
> part of any other string, regardless of whether it appears once or
> multiple times.
>
> I know in regex the dollar sign is a special character, but this,
> as far as I can tell, does absolutely nothing, and I don't know
> why:
>
> Subject: \$
I am assuming that you have at least a "Score: -9999" in there
somewhere and have your score entered under an appropriate hierarchy?
For example:
[.]
Score: -9999
Subject: \$
If you haven't come across it yet, you can test regex patterns before
you put them to use in the Xnews regex tester ("Special" menu, "Test
Regex" submenu).
Enter the regex in the Pattern field such as: \$, enter a string to
test it against in the "Test string" field, such as: make big $$$$ now!
and click the "Match" button to see what happens. Either you'll get a
match or not. My results for \$ matched on the first $ it found in the
string.
Anyway, scoring on Subject: \$ works for me, so I suspect its what you
have (or haven't) entered into Score.ini before your score runs.
--
dee
Re: Xnews score file / regex help request
Author: Ted S.
Date: Sun, 02 May 2010 03:22
Date: Sun, 02 May 2010 03:22
31 lines
2350 bytes
2350 bytes
On Sun, 2 May 2010 01:05:18 +0000 (UTC), Zars wrote: > Hello, > > I'm attempting to write a scoring expression for my Xnews score.ini > and am not having any success, and I'm even sure what I'm doing > wrong. I've read Luu's scoring/regex section, and have also done > some fruitless poking around on the web. Perhaps I'm just obtuse. > > Anyway, what I would like is a filter that kills the dollar sign - > $ - anywhere in a subject, either by itself, or part of a price, or > part of any other string, regardless of whether it appears once or > multiple times. > > I know in regex the dollar sign is a special character, but this, > as far as I can tell, does absolutely nothing, and I don't know > why: > > Subject: \$ > > Any regex gurus out there want to share their expertise? > > Many thanks! Post your regex, and the headers of a post that gets through that you think should have been killed. Somebody might be able to help you then. -- Ted S. fedya at hughes dot net Now blogging at http://justacineast.blogspot.com
Re: Xnews score file / regex help request
Author: Zars
Date: Sun, 02 May 2010 04:11
Date: Sun, 02 May 2010 04:11
19 lines
1889 bytes
1889 bytes
Mike Dee <mikedee@emteedee.invalid> wrote in news:Xns9D6C85B50506Demteedee@212.227.158.24: [snip] Thanks for the replies, Mike & Ted. After mucking about with it a bit more, I discovered that apparently my scores.ini file, or part of it anyway, was corrupted because it appears that Xnews was only parsing about half of it for some reason. This may or may not be related to me having to restore from some backups recently. I deleted the scores.ini file, created a fresh one, and everything seems to work now, including the filter I had the question about. *grumble* Regards, Zars
Re: Xnews score file / regex help request
Author: Steve Bonine
Date: Sun, 02 May 2010 12:48
Date: Sun, 02 May 2010 12:48
7 lines
1367 bytes
1367 bytes
Zars wrote: > I deleted the scores.ini file, created a fresh one, and everything > seems to work now, including the filter I had the question about. > *grumble* Never grumble when things work. The gods will hear.
Re: Xnews score file / regex help request
Author: Graham Tanner
Date: Mon, 10 May 2010 17:37
Date: Mon, 10 May 2010 17:37
57 lines
2928 bytes
2928 bytes
Zars <azoblue@myrealbox.DOTcom> wrote in news:Xns9D6BCC78223AEwIVEjAZz5Nidi@85.214.78.28: > Hello, > > I'm attempting to write a scoring expression for my Xnews score.ini > and am not having any success, and I'm even sure what I'm doing > wrong. I've read Luu's scoring/regex section, and have also done > some fruitless poking around on the web. Perhaps I'm just obtuse. > > Anyway, what I would like is a filter that kills the dollar sign - > $ - anywhere in a subject, either by itself, or part of a price, or > part of any other string, regardless of whether it appears once or > multiple times. > > I know in regex the dollar sign is a special character, but this, > as far as I can tell, does absolutely nothing, and I don't know > why: > > Subject: \$ > > Any regex gurus out there want to share their expertise? > > Many thanks! > Since ZARS appears to have got his Scorefile problem sorted, maybe I will use the opportunity to ask a related question of my own ... I'm also trying to write a scoring expression to weed-out a large number of messages which have a fairly regular 'Subject:' line ... but the only common part that I can use in my expression already contains single quotes. For example, on one day I will see messages containing ... blah, blah, '1' of '20' blah, blah, '2' of '20' and so on ... the next day, there will be similar messages, but a different 'of xx' number ... blah, blah, '1' of '45' blah, blah, '2' of '45' and so on ... The only part that is common to all the messages is ---' of '---; that is, single quote-space-of-space-single quote. So, how do I create a regular expression for that string? Many thanks for any help. GT, London.
Re: Xnews score file / regex help request
Author: Guy
Date: Mon, 10 May 2010 18:07
Date: Mon, 10 May 2010 18:07
30 lines
2569 bytes
2569 bytes
Graham Tanner wrote: > I'm also trying to write a scoring expression to weed-out a large > number of messages which have a fairly regular 'Subject:' line ... > but the only common part that I can use in my expression already > contains single quotes. > > For example, on one day I will see messages containing ... > > blah, blah, '1' of '20' > blah, blah, '2' of '20' > and so on ... > > the next day, there will be similar messages, but a different 'of > xx' number ... > > blah, blah, '1' of '45' > blah, blah, '2' of '45' > and so on ... > > > The only part that is common to all the messages is ---' of '---; > that is, single quote-space-of-space-single quote. > > So, how do I create a regular expression for that string? > subject: '\d+' of '\d+'
Re: Xnews score file / regex help request
Author: John Wunderlich
Date: Mon, 10 May 2010 19:29
Date: Mon, 10 May 2010 19:29
45 lines
2332 bytes
2332 bytes
Graham Tanner <graham.tanner1@virgin.net> wrote in news:Xns9D74BD86CD20Dgrahamtanner1virginn@69.16.176.253: > I'm also trying to write a scoring expression to weed-out a large > number of messages which have a fairly regular 'Subject:' line ... > but the only common part that I can use in my expression already > contains single quotes. > > For example, on one day I will see messages containing ... > > blah, blah, '1' of '20' > blah, blah, '2' of '20' > and so on ... > > the next day, there will be similar messages, but a different 'of > xx' number ... > > blah, blah, '1' of '45' > blah, blah, '2' of '45' > and so on ... > > > The only part that is common to all the messages is ---' of '---; > that is, single quote-space-of-space-single quote. > > So, how do I create a regular expression for that string? > > Many thanks for any help. > > GT, > London. > You could try this: Score: -9999 Subject: \'\d+\' of \'\d+\' This will match the single quote (\'); followed by a decimal number 0-9 (\d) potentially repeated (+); followed by a quote (\') then space-of- space, then a repeat of a decimal number in quotes. HTH, John
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads