Re: How to extract the "domain" part from a mail address
On Fri, 6 Feb 2004 04:09:55 +0100, dAniel hAhler wrote: [IF macro] >>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.. :) I've got Januk's version (with Zygmunt's correction) to work. Hurray! Thank you all for your combined effort to help me out. I've saved your replies to my mail-archive and will try to make cheese of it (as we say in Holland ;-) Arjan -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: How to extract the "domain" part from a mail address
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
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
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
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
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
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
Re: How to extract the "domain" part from a mail address
Hello bats, on Thu, 5. Feb 2004 at 01:24:45 +0100 Arjan de Groot wrote: A> %IF:"%TO"has"yahoogroups.com"in it:%FROM="Arjan de Groot <[EMAIL PROTECTED]>": A> %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]>" -- 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
Hallo Arjan, On Thu, 5 Feb 2004 01:24:45 +0100GMT (5-2-04, 1:24 +0100, where I live), you wrote: AdG> Now, what I really want is this macro to work for _all_ AdG> Yahoogroups. In other words, if I send a message to any of the AdG> Yahoogroups mailing lists, my GMX address should be used, in all AdG> 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. -- Groetjes, Roelof http://www.silverstones.com/thebat/TBUDLInfo.html
How to extract the "domain" part from a mail address
In one of my templates I use a macro that looks like this: %IF:"%TO"="[EMAIL PROTECTED]":%FROM="Arjan de Groot <[EMAIL PROTECTED]>": %FROM="Arjan de Groot <[EMAIL PROTECTED]>" Which means: if I send a message to TBOT, my GMX address will be used and if I send a message elsewhere, my tmfweb address will be used. 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. Loosely translated in macro language: %IF:"%TO"has"yahoogroups.com"in it:%FROM="Arjan de Groot <[EMAIL PROTECTED]>": %FROM="Arjan de Groot <[EMAIL PROTECTED]>" I know this can be accomplished with the REGEX macro's, but I'm afraid most of them are far beyond me at the moment. Can anyone tell me how to do it, or give me some directions to a place where I can find a more thorough description of those complicated macro's? I've consulted the Help file, but that didn't help much. Arjan -- http://www.silverstones.com/thebat/TBUDLInfo.html