Hello bats,

on Thu, 15. Apr 2004 at 12:26:32 +0200 Krzysztof Kudlacik wrote:

>> You just want to kill more than just one address?
> Yes. I want to remove them from CC list, if they are present.

Try this:
----->8--------------------------------------------------------
%_s1=''%-
%_newCC=%CCLIST%-
%SETPATTREGEXP='(?i)(yourpattern)'%-
%until("s1", "", "%-
%%RegExpBlindMatch(%%_newCC)%%-
%%_s1=%%SUBPATT(1)%%-
%%IF:'%%_s1'<>'':#%%_newCC='%%_s1'#%%-
")%-
%CC=''%-
%SETPATTREGEXP='(.*?)(\s*,\s*$)'%-
%IF:"RegExpMatch='%_newCC'"<>"":"%CC=%SUBPATT(1)":%-
"%CC=%_newCC"%-
----->8--------------------------------------------------------

Just apply "yourpattern", eg "[^,^]*(@domain\.tld\s*[,$])". The part in
the round parenthesis is going to be removed.
in case we remove the last address we'll have to make sure to kill the
remaining ',', this is checked after %CC=''.

I did not test this, so there might be some syntax error or even a
infinite loop with the until-part, let me now.. :)

>> Take a look at the MyMacros plugin. It has while() and StrReplace() -
>> both could be used for that.
> :)  thx for your tips, but I am not a programmer - only "end user". Then I
> have to use stuff prepared by others.

I understood.. :o)

Things would be a lot easier if MyMacros' StrReplace would support
RegExps.
Perhaps a good idea to ask the author to implement this, for future
tasks.


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/14 on Windows XP Service Pack 1.


________________________________________________________

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

Reply via email to