Hello Januk,

On Monday, July 30, 2001 at 4:39:08 AM you wrote (at least in part):

JA> I think you've got a good idea, but how would you solve this one:
JA> Suppose your string needs a closing bracket ")" but no opening
JA> bracket.

That's quiet easy :-) And the best is: it doesn't matter if there's an opening
bracket before a closing one or not :-)

Escape-sequences is the magic word :-)

In your example it would look like this:

%IF("%DOW"="Friday":"It's almost the weekend ;-\)":"")

It's a very common syntax used in many cases (at least on several *nix
platforms in several [or should I say _much_ *G*] programs/situations).
There're some more escape sequences like '\n' (that one you should know) or
'\\' (which represents a single back-slash), '\d'  (single digit) '\[' for
opening square bracket _as char_ (because a normal opening square bracket
would be interpreted as beginning of a 'string of characters from which every
single one an be the next for match the pattern', in other words: RegExp
'P[aeiou]n' would match 'Pan|Pen|Pin|Pon|Pun') ... and so on ...
I think MaxXx idea is not bad and should _maybe_ (of course it on RIT if they
decide it's worth the work on it!!!) evaluated after current Beta series is
released as stable :-)
In my humble opinion this would be a really _good_ feature; brackets in macro
syntax and the possibility of escaped special chars (not all at first, I don't
think we really need _every_ special char Perl regexp offers from beginning).
I think introducing this possibilities will offer some new developments
in Template and Quick-Template macros that can be published in FAQ and/or help
section(s) :-)
-- 
Regards
Peter Palmreuther                            mailto:[EMAIL PROTECTED]
(The Bat! v1.54 Beta/4 on Windows NT 5.0 Build 2195 Service Pack 2)

Beware of a dark-haired man with a loud tie.

-- 
______________________________________________________
Archives   : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>


Reply via email to