-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi ANT-ilic,
On 26 April 2001 at 18:40:06 +0200 (which was 17:40 where I live)
ANT-ilic wrote to Januk Aggarwal and made these points:
Ai>>> Question is: "What is wrong here?"
"Loads, mate"!
JA>> <snip>
Ai>>> I tried something like this:
Ai>>> %SUBJ='%SETPATTREGEXP="(\[MkForum\]\s)(.*)"%REGEXPBLINDMATCH=%text%SUBPATT="2"'
JA>> ^^^^^^
JA>> That's the problem. Change it to:
JA>> ...%REGEXPBLINDMATCH="%text"...
JA>> ^ ^
Ai> Nope... That's not it... It's still the same... ;(
Ai> I must read a bit more on this...
Ai> I think that %SUBJ is immediately added and that nothing is passed to
Ai> %SETPATTREGEXP?
It should be this:
%SUBJECT='%SETPATTREGEXP="^(\[MkForum\]\s)?(.*)"%REGEXPBLINDMATCH="%subj"%SUBPATT="2"'
or this:
%SUBJECT='Re:
%SETPATTREGEXP="^(\[MkForum\]\s)?(.*)"%REGEXPBLINDMATCH="%subj"%SUBPATT="2"'
Ai> What "" are this for? Parenthesis is that what they're called?
No, quotes. They are used to delimit text parameters.
Ai> When I remove all of "" I get an error unmatched parenthesis, or
Ai> something...
Ai> I played around and it seems that they change meaning of expressions a
Ai> lot... Some explanations would be great...
Okay:
%SUBJECT=
Change the message "Subject" header to something new.
'
Begin the string that contains the new subject text.
Re:
Start with the constant "Re: " since it is a reply.
%SETPATTREGEXP=
Next follows a "regular expression pattern".
"
Begin the pattern.
^
The pattern starts at the beginning of the string...
(
...and start with a sub-pattern (or "string" in this instance).
\[
The string we want starts with a '[', but since that has a special
meaning in the world of RegEx (begin character class definition) we
have to put a '\' in front of it to say "A real '['".
MkForum\]
Plain text "MkForum" and of course the closing \], explanation as
above.
\s
Match a single space.
)?
End of the first sub-pattern (which may or may not be present).
(.*)
Define second sub-pattern which is the rest of the input.
"
End the whole pattern.
%REGEXPBLINDMATCH="%subj"
Apply that regular expression to the string held in the current
Subject text.
%SUBPATT="2"
Retrieve the second sub-pattern matched.
'
End the subject redefinition.
- --
Cheers -- .\\arck D. Pearlstone -- Moderator TBUDL / TBBETA / TBTECH
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ PGP Key ID: 0x929DCDA0 | www: http://www.silverstones.com ]
[ Any opinions are my own and not those of RIT labs ]
TB! v1.52 Beta/12/iKey1000 S/N 14F4B4B2 on Windows NT 5.0 Build 2195 Service Pack 1
-----BEGIN PGP SIGNATURE-----
Version: 6.5.8ckt (build 05)
Comment: PGP Sealed for freshness
iQA/AwUBOuiFCjnkJKuSnc2gEQKgngCgpSgUMRgKlGu3aqeHLboh/WM12TIAn2II
WlSU73IUzWTgCJYjA2bu0T9m
=x8tk
-----END PGP SIGNATURE-----
--
______________________________________________________
Archives : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>
You are subscribed as : [email protected]