Re: Small regex needed

2005-12-06 Thread Thomas Fernandez
Hello Roelof,

On Sun, 4 Dec 2005 18:13:35 +0700 GMT (04/12/2005, 18:13 +0700 GMT),
Thomas Fernandez wrote:

TF Yes, this sounds about right. I will test it in the office on Tuesday.

Test successful. Thanks a lot.

-- 

Cheers,
Thomas.

The closest I ever got to a 4.0 in high school was my blood alcohol
content.
http://thomas.fernandez.hat-gar-keine-homepage.de/

Message reply created with The Bat! 3.63.06 (Beta)
under Windows XP 5.1 Build 2600 Service Pack 2





Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Small regex needed

2005-12-04 Thread Roelof Otten
Hallo Thomas,

On Sun, 4 Dec 2005 10:10:40 +0700GMT (4-12-2005, 4:10 +0100, where I
live), you wrote:

TF I want to use the output from the regex in an %Account= macro.
TF Something like this:

TF %SetRegexSource=Headers
TF %FindLine_StartsWith: X-Apparently-To:
TF %ExtractPattern: The part before @
TF %Account= Extracted pattern

You mean something like this?
%Account='%-
%SetPattRegExp=(?m-s)^X-Apparently:\s(.*/?)@company.com%-
%RegExpBlindMatch=%Headers%-
%SubPatt=1%-
'%-

Didn't test it, so that's up to you. I don't have any messages with an
X-Apparently header. Note that my first draft of any given regexp uses
to contain typos.

Other solutions are possible, like when you've defined X-Apparently as
header in TB.

-- 
Groetjes, Roelof

He says a thousand pleasant things, but never Adieu.

The Bat! 3.63.06 (Beta)
Windows XP 5.1 Build 2600 Service Pack 2
1 pop3 account, server on LAN
OTFE enabled
P4 3GHz
2 GB RAM


pgpltkTkGhHFb.pgp
Description: PGP signature

Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: Small regex needed

2005-12-04 Thread Thomas Fernandez
Hello Roelof,

On Sun, 4 Dec 2005 09:50:32 +0100 GMT (04/12/2005, 15:50 +0700 GMT),
Roelof Otten wrote:

RO You mean something like this?
RO %Account='%-
RO %SetPattRegExp=(?m-s)^X-Apparently:\s(.*/?)@company.com%-
RO %RegExpBlindMatch=%Headers%-
RO %SubPatt=1%-
RO '%-

Yes, this sounds about right. I will test it in the office on Tuesday.

RO Other solutions are possible, like when you've defined
RO X-Apparently as header in TB.

Yes, I have. If the above doesn't work, I'll be back.

-- 

Cheers,
Thomas.

SYMPTOM: Beer tasteless, front of your shirt is wet. FAULT: Mouth not
open, or glass applied to wrong part of face. ACTION: Retire to
restroom, practice in mirror.
http://thomas.fernandez.hat-gar-keine-homepage.de/

Message reply created with The Bat! 3.63.06 (Beta)
under Windows XP 5.1 Build 2600 Service Pack 2




Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Small regex needed

2005-12-03 Thread Thomas Fernandez
Hello TBUDL,

Due to a little hickup I had recently, I lost one month' worth of
emails in my main account and have to reply out of the archive. My
setup is this:

1.) By way of X-Ray, every mail gets an additional header
X-Apparently-To: [EMAIL PROTECTED] if the mail was received
department1, or X-Apparently-To: [EMAIL PROTECTED] if the mail
was received by department2. And so on. This is also works for mails
that were just BCC'ed and for cross-postings, the X-Ray team built
this for me. (Thanks again.)

There are seven such departmental email addreses.

2.) All messages are copied into the archive, which is an account in
TB. By way of the above header, I can tell to which
account/email-address the message was originally sent. The archive
holds over 100,000 messages currently, neatly sorted into folders.

3.) The active accounts in TB are called Department. For example,
Department1 is for the email address [EMAIL PROTECTED]

4.) This is what I want to do: When I reply out of the archive, I want
the regex to extract the part before the @ in the email address in
the header line start starts with X-apparently-To:, so that the
account is set to the active (departmental) account. I now do that
manually by choosing account in the editor, but I want to automate it.

I want to use the output from the regex in an %Account= macro.
Something like this:

%SetRegexSource=Headers
%FindLine_StartsWith: X-Apparently-To:
%ExtractPattern: The part before @
%Account= Extracted pattern

I hope the above pseudo-regex explains what I mean.

-- 
Thanks,

Thomas.



Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html