Hello Marco, Jast and fellow Regexp-Junkies ;-)
On Fri, 9 Jun 2000 18:16:34 +0200, Jast wrote:
> Ooh, I see. In this case, it might be practicable to modify an older regex
> constructed for stripping multiple Re:'s and country specific things
> introduced by MS like "AW:" and the likes.
> The original thing is this:
> %subject=""%subject="Re:
>%SETPATTREGEXP=""(?i)((Re|Aw)\:\s*)*(.*)""%REGEXPBLINDMATCH=""%OSUBJ""%SUBPATT=""3"""
Following the same principle, the magic thing for extracting the
number including the brackets from the %replycounter macro WOULD be:
%SETPATTREGEXP='Re(\[\d+\])?:'%REGEXPBLINDMATCH='%REPLYCOUNTER'%SUBPATT='1'
It returns a blank string for 'Re:' and '[x]' for 'Re[x]:'
I said WOULD because there is a fly swimming in the soup: the macro
doesn't work because of some TB! internals. If you replace
%REGEXPBLINDMATCH='%REPLYCOUNTER' with %REGEXPBLINDMATCH='%TEXT' and
have an appropriate test message, you can see that the macro is
working.
The internal problem is that at the time the regexp is evaluated,
the macro %REPLYCOUNTER contains just a plain 'Re:'; the bracketed
number gets inserted only afterwards, so we got no chance to
retrieve the number with a RegExp.
Perhaps Ritlabs could change this order for 1.45?
Regards
Peter
--
Peter Steiner <[EMAIL PROTECTED]> PGP-ID 0x02850F53 (DH/DSS)
PGP Fingerprint 68AB D08E D995 41B4 C6FD 639D 9B94 D249 0285 0F53
"Du weisch doch, das me n imene Totem�gerli
nid darf nei s�ge!" - Franz Hohler
--
--------------------------------------------------------------
View the TBUDL archive at http://tbudl.thebat.dutaint.com
To send a message to the list moderation team double click here:
<mailto:[EMAIL PROTECTED]>
To Unsubscribe from TBUDL, double click here and send the message:
<mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------
You are subscribed as : [email protected]