🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Walter Johnson Fri, 27 Feb 2004 09:51
[Dialog] How- RegExp in !move() Action?
#144207
Author: Walter Johnson
Date: Fri, 27 Feb 2004 09:51
23 lines
2023 bytes
I'm trying to create an action rule that will move incoming
emails into a folder named for a piece of text in the 
subject line (a 10-digit number)

This action statement works just fine, testing for the existence
of a 10-digit number (using a regular expression), and moving
the emails into the folder "test":

[email.*]
!move(test) subject {(\d{10})}

But the other part of an action statement, in this case a !move()
function, doesn't seem to take expressions, except in the example
cases of an X-header Name:Value pair, which won't work for the
subject line.

I need to take the 10-digit number (or a substring of it), and
use that as the name of the folder to move the email to.  For
example, an email with the subject line:
"eBay item#1234567890 Bag of Seedless Peanuts" would be moved
into a folder named "1234567890".  

Can anybody give me a clue, how to achieve this?  :-)
Re: [Dialog] How- RegExp in !move() Action?
#144297
Author: Antonio 'Gandalf' Favata
Date: Sun, 29 Feb 2004 07:19
20 lines
2069 bytes
Walter Johnson skribis:

> I need to take the 10-digit number (or a substring of it), and
> use that as the name of the folder to move the email to.

Try this:

[email.*] 
!move(%Subject%) Subject {\b(\d{10})\b}

> "eBay item#1234567890 Bag of Seedless Peanuts" would be moved
> into a folder named "1234567890".  

With this rule, the folder would be named «eBay item#1234567890 Bag of
Seedless Peanuts» instead.
-- 
Fare Well!  G  ~ http://snurl.com/dialog ~ http://www.x-privat.org/it-alt
«Once such incantatory phrases as "we see now through a glass darkly" and
"mysterious are the ways He chooses His wonders to perform" are mastered,
logic can be happily tossed out the window.»  (Stephen King, "The Stand")
Re: [Dialog] How- RegExp in !move() Action?
#144332
Author: Walter Johnson
Date: Mon, 01 Mar 2004 06:18
28 lines
2174 bytes
On Sun, 29 Feb 2004 08:19:31 +0100, Antonio 'Gandalf' Favata wrote:

> Walter Johnson skribis:
> 
>> I need to take the 10-digit number (or a substring of it), and
>> use that as the name of the folder to move the email to.
> 
> Try this:
> 
> [email.*] 
> !move(%Subject%) Subject {\b(\d{10})\b}
> 
>> "eBay item#1234567890 Bag of Seedless Peanuts" would be moved
>> into a folder named "1234567890".  
> 
> With this rule, the folder would be named «eBay item#1234567890 Bag of
> Seedless Peanuts» instead.

Thanks for your help, Antonio.  It is a good idea, but alas, it 
creates a folder named "%subject%", instead of a folder named 
the text of the subject line.
And !move({%subject%}) creates a folder named "{%subject%}", etc.

It seems that !move()  just doesn't accept expressions, only text.
And the same restriction applies to scoring rules, unfortunately:
=+1000 works, but =+{expression} doesn't work.  :-(

Maybe that feature will added in a future release.
Re: [Dialog] How- RegExp in !move() Action?
#144360
Author: Alan Ford
Date: Mon, 01 Mar 2004 20:15
20 lines
2162 bytes
Di /lunedì, 01 marzo 2004/, *Walter Johnson* ha scritto:

>>> I need to take the 10-digit number (or a substring of it), and
>>> use that as the name of the folder to move the email to.
>> Try this:
>> 
>> [email.*] 
>> !move(%Subject%) Subject {\b(\d{10})\b}
> 
> Thanks for your help, Antonio.  It is a good idea, but alas, it 
> creates a folder named "%subject%", instead of a folder named 
> the text of the subject line.

Yes, but if you click over that's messages... :)

Bye.

-- 
 /   _ _ | Xnews e la documentazione in italiano
( (/( (/ | http://web.lacasadialice.it/alanford/
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