Re: How to extract the "domain" part from a mail address

2004-02-05 Thread dAniel hAhler
Hello bats,

on Thu, 5. Feb 2004 at 23:49:12 +0100 Arjan de Groot wrote:

>>> %IF:"%TO"has"yahoogroups.com"in it:%FROM="Arjan de Groot <[EMAIL PROTECTED]>":
>>> %FROM="Arjan de Groot <[EMAIL PROTECTED]>"

>>%SETREGEXPPATT='.*?@(yahoogroups.com)'&-
>>%IF:%REGEXPMATCH='%TO'<>'':%FROM="Arjan de Groot <[EMAIL PROTECTED]>":%-
>>%FROM="Arjan de Groot <[EMAIL PROTECTED]>"

A> I tried it, but alas, no success. :-(

As Zygmunt wrote, it should be %SETPATTREGEXP instead of
%SETREGEXPPAT, I didn't test it.

Either you try this again or use the (modified) solution of Januk, but
you should get your %IF-solution.. :)

A> The %IF part in particular got me puzzled. What does it mean?
A> "If  matches  doesn't match "

IF  matches THEN %FROM="Arjan de Groot
<[EMAIL PROTECTED]>" ELSE %FROM="Arjan de Groot <[EMAIL PROTECTED]>

..and the regular expression checks for the pattern
",*?(yahoogroups.com)" (anything which ends with "@yahoogroups.com")
in %TO..

you should probably include the THEN and ELSE parts of the %IF macro
in ''s, from the beginning of : upto the end, like this:

%SETREGEXPPATT='.*?@(yahoogroups.com)'&-
%IF:%REGEXPMATCH='%TO'<>'':'%FROM="Arjan de Groot <[EMAIL PROTECTED]>"':%-
'%FROM="Arjan de Groot <[EMAIL PROTECTED]>"'

Don't know, if this is necessary, as this is try-and-see for myself.

A> I'm feeling like I'm in 1st grade all over again.

Don't have to. Check the help. it's not good, but can help though.. :)


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.03 Beta/53 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: How to extract the "domain" part from a mail address

2004-02-05 Thread Januk Aggarwal
Hello Zygmunt,

On Friday, February 6, 2004 at 00:11 GMT +0100, earthworms were
entertained when Zygmunt Wereszczynski [ZW] exposed:

ZW> Simply mistake, it should be %SETPATTREGEXP (this error comes from
ZW> copy of dAniel's message).

Yes of course.  I should know better.  Thanks.

-- 
Thanks for writing,
 Januk Aggarwal






http://www.silverstones.com/thebat/TBUDLInfo.html


Re: How to extract the "domain" part from a mail address

2004-02-05 Thread Zygmunt Wereszczynski
On Thursday, February 5, 2004, at 14:58:59 [UTC-0800] (Thursday, February 5,
2004 23:58 my local time) Januk Aggarwal wrote:
>> I tried it, but alas, no success. :-(

> It would probably work better using variables:

> %_Test="%-
> %%SETREGEXPPATT='.*?@(yahoogroups.com)'%-
^
Simply mistake, it should be %SETPATTREGEXP (this error comes from
copy of dAniel's message).


-- 
Best regards,
Zygmunt Wereszczynski
(Using The Bat! v2.03 Beta/53 on Windows 2000 5.0 Build 2195 Service Pack 4)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: How to extract the "domain" part from a mail address

2004-02-05 Thread Januk Aggarwal
Hello Arjan,

Thursday, February 5, 2004 at 23:49 GMT +0100, was when inspiration
required Arjan De Groot to compose:

>>%SETREGEXPPATT='.*?@(yahoogroups.com)'&-
>>%IF:%REGEXPMATCH='%TO'<>'':%FROM="Arjan de Groot <[EMAIL PROTECTED]>":%-
>>%FROM="Arjan de Groot <[EMAIL PROTECTED]>"

> I tried it, but alas, no success. :-(

It would probably work better using variables:

%_Test="%-
%%SETREGEXPPATT='.*?@(yahoogroups.com)'%-
%%REGEXPMATCH='%TO'"%-
%IF:'%_Test'<>'':'%FROM="Arjan de Groot <[EMAIL PROTECTED]>"':'%-
%FROM="Arjan de Groot <[EMAIL PROTECTED]>"'

-- 
Thanks for writing,
 Januk Aggarwal





http://www.silverstones.com/thebat/TBUDLInfo.html


Re: How to extract the "domain" part from a mail address

2004-02-05 Thread Arjan de Groot
On Thu, 5 Feb 2004 02:28:29 +0100, dAniel hAhler wrote:

>> %IF:"%TO"has"yahoogroups.com"in it:%FROM="Arjan de Groot <[EMAIL PROTECTED]>":
>> %FROM="Arjan de Groot <[EMAIL PROTECTED]>"

>That should do it:

>%SETREGEXPPATT='.*?@(yahoogroups.com)'&-
>%IF:%REGEXPMATCH='%TO'<>'':%FROM="Arjan de Groot <[EMAIL PROTECTED]>":%-
>%FROM="Arjan de Groot <[EMAIL PROTECTED]>"

I tried it, but alas, no success. :-(

The %IF part in particular got me puzzled. What does it mean?

"If  matches  doesn't match "

I'm feeling like I'm in 1st grade all over again.


Arjan
-- 






http://www.silverstones.com/thebat/TBUDLInfo.html


Re: How to extract the "domain" part from a mail address

2004-02-05 Thread Arjan de Groot
On Thu, 5 Feb 2004 02:14:26 +0100, Roelof Otten wrote:

>> Now, what I really want is this macro to work for _all_
>> Yahoogroups. In other words, if I send a message to any of the
>> Yahoogroups mailing lists, my GMX address should be used, in
>> all other cases my tmfweb address.

> One way to do this is with Address Book templates.
> Select all addresses you want to use your gmx address and drop
> them in one group. Insert for this group (in the properties) a
> template for new messages, one for replies and maybe one for
> forwards too and use the %from macro.

Thanks. This sure looks like a failproof method, but it lacks
IMHO the, uhmm.. "elegance" of the %IF macro, if you know what I
mean.

I'll use it until I got those  REGEX macro's figured out.


Arjan
--






http://www.silverstones.com/thebat/TBUDLInfo.html