Hi,
I was asked to solve a little regexp problem, but I'm not really into
it... Well, the problem are Mail which are forwarded in a mailing list and
look like this:
/********************
------- Forwarded message follows -------
|From: [EMAIL PROTECTED] (John Smith)
|To: [EMAIL PROTECTED]
|Subject: Re: Wer kann helfen?
|Date sent: Wed, 26 Apr 2000 07:08 +0200
Here comes some Text.
Regards....
*********************/
What she wants is to extract the name in the from and the date and set is
as the first line in the reply, like this:
John Smith schrieb am Wed, 26 Apr 2000 07:08 +0200[1]
Well, my first draft to solve this is
%QUOTES="%SetPattRegExp=""From:\s*.*@.*\((.*)\)""%RegExpBlindMatch=""%Text""%SubPatt=""1"""
schrieb am %QUOTES="%SetPattRegExp=""Date
sent:\s*(.*)""%RegExpBlindMatch=""%Text""%SubPatt=""1"""
which results in:
/********************
> John Smith
schrieb am > Wed, 26 Apr 2000 07:08 +0200
> Here comes some Text.
> Regards....
*********************/
Which is quite near to success. I can't use %TEXT instead of %QUOTES
because it doesn't work, and I don't know where the linefeed comes from.
Am I right when telling that only %REGEXPBLINDMATCH works with SubPatt and
that Regexptext won't do the job here?
Hope you have the right hint for me/us! Big TIA
G�nther
[1] I didn't manage to do it like "On %DATE, John Smith wrote: " for this
list, because then just crap comes out -> so sorry for the German words.
--
German TB! faq, and cut.exe - delete ads in mails
http://www.guenther-eisele.de/bat/
TheBat! 1.52f, Windows NT 5.0
--
______________________________________________________
Archives : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>
You are subscribed as : [email protected]