Hello Dierk,

On Thursday, October 4, 2001 at 16:47 GMT +0200, a creature mimicking
Dierk Haasis [DH] wrote:

>>   <1> what does the %- designate?

DH> It tells TB! that the REGEX is broken into a new line at this point.

Slight correction, the %- has two meanings:
1. If at the end of the line, it suppresses the line break.  It has
   nothing to do with Regular Expressions.

2. The %- macro is a place holder, it inserts a NULL string.  Suppose
   you want to prepend the output of one macro to a fixed string, then
   you can run into trouble.  In the template, you need to separate
   the macro from the string with a space, giving you an undesired
   result.  You can replace the space with the %- macro to mark where
   the macro ends and the string begins.

DH> Usually they have to be in one line.

This is only true if you don't want a bunch of blank lines in the
output of the template.

DH> The developers were nice enough to include this upon request to
DH> make REGEX better readable and easier to grasp.

While what you say is basically true, this macro is useful for *any*
complex template.  There have been a myriad of examples posted with
*no* regexps where the %- has proven useful.

For example, one person wanted a quick template to add two blank lines
at the end.  Because of TB's free caret editors, that wasn't possible
without the %- macro.  The solution was to put the %- macro on the
third blank line at the end of the template.  This is an example of
the second function primarily.

-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.54 Beta/8 under Windows 98 4.10 Build 2222 A

I was the next door kid's imaginary friend.


-- 
________________________________________________________
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d
FAQ        : http://faq.thebat.dutaint.com 

Reply via email to