Hello Silviu,
On Saturday, September 15, 2001 at 00:54 GMT +0300, a creature
mimicking Silviu Cojocaru [SC] wrote:
>> You're doing something a little wrong. It's the nested quotes
>> that are messing it up.
>>
>> Try:
>>
>> %Ucfirst="%Subpatt='2'"
>>
>> or
>>
>> %Ucfirst="%Subpatt=""2"""
>>
>> To compensate for the nesting issues.
SC> It aint working.
It won't work because no subpatterns are defined inside the %UCFIRST
macro. You have to set the subpattern, do the match and then access
the subpattern *inside* the %UCFIRST="" quotes. The way to think of
it is: the argument to any macro is like a mini-template[1]. These
mini-templates are almost completely independent of any other
template, including the main template.
This is useful when you want a regexp within a regexp, or if you have
more than one regexp in a given template. Now a solution would be to
have a macro to define and access global variables.
[1] - This analogy does break down in certain cases. But for the
macro in question, it is a reasonable simile.
--
Thanks for writing,
Januk Aggarwal
Using The Bat! 1.54 Beta/8 under Windows 98 4.10 Build 2222 A
Ok, who is General Relativity, and what did he do with Sir Newton?
--
_________________________________________________________
Archives : http://tbbeta.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Beta: 1.54 beta/8