Hello Januk,
Tuesday, April 17, 2001, 1:52:01 AM, you wrote:
JA> Now in your group template (or a quick template included into your
JA> group template), use the following regexp on one line:
JA>
%SETPATTREGEXP="(?i)(?(?=.*?\<list\>.*?;;.*;;.*).*;;(.*);;.*|.*;;.*;;(.*))"%REGEXPBLINDMATCH="%TOLIST%CCLIST%BCCLIST;;%QINCLUDE=""GROUP"";;%QINCLUDE=""INDIV""
JA> This seems to work on my system. Now it works by looking for the word
JA> "<list>" in the TO:, CC: and BCC: lines. This might not be ideal in
JA> all situations. Let us know how it works. If it needs tweaking for
JA> your situation, let us know as well.
YES!! It works. Thank you!!
There is one small hitch (that I can live very well with).
If I have several groups and recipient are member of more
than one, they might not use the correct template.
And then the question is Why does it work? I dont know if it is
within the scope of this list to teach regular expressions, but:
If I understand it correct, it is the %SETPATTREGEXP that makes
things happen. It collects from %REGEXPBLINDMATCH and gives it
further to the editor.
Why the (?i)?
I recognise the syntax (?(xxx)yyy|zzz) inside the %SETPATTREGEXP.
If xxx is true then yyy is given to the editor, else zzz is given.
I recons that "?=.*?\<list\>.*?;;.*;;.*" reads the input from
%TOLIST%CCLIST%BCCLIST and looks for the word the word <list>.
But why the ".*?;;*;;.*" ?
If list is found then ".*;;(.*);;.*" is given to the editor, and
this is taken from %QINCLUDE=""GROUP"" -
Is ;; a common divider between elements?
Why is .* first without paranthesis, then with and then without?
And after the | it is different - without, without and the with
paranthesis.
And why the "%SUBPATT="1"%SUBPATT="2" ?
Regular expressions seems like black magic, but I know it must be
some logic to them.
--
Best regards,
Ottar mailto:[EMAIL PROTECTED]
--
______________________________________________________
Archives : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>
You are subscribed as : [email protected]