--- Kevin <[EMAIL PROTECTED]> wrote:
> Hi Raymond,
> 
> ... If I have understood you are wanting a
> complex multi line string like your examples below
> to pass to the template manager.

Not really. I'm creating a way to embed container
fields with text/html inside a template:

var html='Some text here'
+'[EMAIL PROTECTED]:['
+'   Some text here '
+'   more text here'
+'   [EMAIL PROTECTED]:['
+'      Some text/html here for field2'
+'      Some text here for field2'
+'   ]} [EMAIL PROTECTED]'
+']}'
+'Some text here '

These new type of container fields can be used for
retrieving text/html directly from the template:

var tp=new Template(html);
fld2=tp.getField('field2'); // retrieve field2 
alert(fld2);
// ^ this will alert "Some text here for field2"
fld2+=' Add some text/html';
tp.setField('field2',fld2); // set field2

I think I've found a solution for the above. This
solution will allow us to nest container fields as
shown above.
 
--
Raymond Irving

> -
> Kevin 
> 
> "Raymond Irving" <[EMAIL PROTECTED]> wrote:
> > 
> > See below:
> > 
> > --- Leif W <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > > 
> > > I'm familiar (but not expert) with regexp usage
> from
> > > Perl and PHP, as well
> > > as sed.  I've taken a look and separated the
> > > variable names to keep track of
> > > things.
> > > 
> > > var s = " test <table>[EMAIL PROTECTED]</table2> this is
> a
> > > [EMAIL PROTECTED]
> > > [EMAIL PROTECTED]:[test message]} tht ere [EMAIL PROTECTED]:[test
> > > message4]}";
> > > var r = /[EMAIL PROTECTED]/g;
> > > var a = s.match(r);
> > > var t = a.join();
> > > var u = t.replace(/\{@(\w+?)\W.+?\}/g,'$1');
> > > alert(
> > >     't\t: ' + t + '\n' +
> > >     'u\t: ' + u
> > > );
> > > 
> > > In this example, _t_ has the proper values, but
> _u_
> > > is missing field2 (same
> > > in IE and Mozilla).  So maybe a problem with
> > > t.replace.  I'll keep looking.
> > > This preceeds the original question about
> matching
> > > multiple lines.  Can you
> > > give an example of multi-line field names?  Or
> is it
> > > multi-line content?
> > > Like this?
> > 
> > Thanks for you help thus far.
> > 
> > As for the milti-line question I was making
> reference
> > to embedded field with (multi-line) content:
> > 
> > [EMAIL PROTECTED]:[some content here]}
> > [EMAIL PROTECTED]:[
> >    some more multi-line
> >    content here
> > ]}
> > 
> > and field without content can be represented as:
> > 
> > [EMAIL PROTECTED] 
> > [EMAIL PROTECTED]:[]} // same as [EMAIL PROTECTED]
> > 
> > --
> > Raymond Irving
> > 
> > > 
> > > [EMAIL PROTECTED]
> > > line-
> > > field-
> > > name:[multi-
> > > line-
> > > content]}
> > > 
> > > 
> > > Leif
> > > 
> > > 
> > > ----- Original Message ----- 
> > > From: "Dev" <[EMAIL PROTECTED]>
> > > To: "Raymond Irving" <[EMAIL PROTECTED]>;
> > > "DynAPI-Dev"
> > > <[EMAIL PROTECTED]>
> > > Sent: Thursday, June 05, 2003 2:58 PM
> > > Subject: Re: [Dynapi-Dev] Help need with RegEx
> > > object
> > > 
> > > 
> > > > Hi, I am not soo good at it either... but got
> some
> > > help from ultraedit...
> > > >
> > > > Se the attatchment
> > > >
> > > > Regards
> > > > Daniel
> > > >
> > > > > Hi,
> > > > >
> > > > > I'm not too familiar with the regex object
> so
> > > I'm
> > > > > wondering if anyone can help me out? Here's
> an
> > > example
> > > > > of what I'm trying to do:
> > > > >
> > > > > var s=" test <table>[EMAIL PROTECTED]</table2> this
> is a
> > > > > [EMAIL PROTECTED] [EMAIL PROTECTED]:[test message]} tht
> ere
> > > > > [EMAIL PROTECTED]:[test message4]}";
> > > > > var r= /[EMAIL PROTECTED]/g;
> > > > > var a= s.match(r)
> > > > > s=a.join()
> > > > > s=s.replace(/\{@(\w+?)\W.+?\}/g,'$1');
> > > > > alert(s)
> > > > >
> > > > >
> > > > > I would like the use regex to get all the
> field
> > > names
> > > > > withing the a string then use another regex
> to
> > > get all
> > > > > multi-line field names and their content
> > > > > ([EMAIL PROTECTED]:[content]}). Is this possible?
> > > > >
> > > > > Many thanks
> > > > >
> > > > > --
> > > > > Raymond Irving
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Do you Yahoo!?
> > > > > Yahoo! Calendar - Free online calendar with
> sync
> > > to Outlook(TM).
> > > > > http://calendar.yahoo.com
> > > > >
> > > > >
> > > > >
> > >
> >
>
-------------------------------------------------------
> > > > > This SF.net email is sponsored by:  Etnus,
> > > makers of TotalView, The best
> > > > > thread debugger on the planet. Designed with
> > > thread debugging features
> > > > > you've never dreamed of, try TotalView 6
> free at
> > > www.etnus.com.
> > > > >
> _______________________________________________
> > > > > Dynapi-Dev mailing list
> > > > > [EMAIL PROTECTED]
> > > > >
> > >
> >
>
http://www.mail-archive.com/[EMAIL PROTECTED]/
> > > >
> > > >
> > > 
> > > 
> > >
> >
>
----------------------------------------------------------------------------
> > > ----
> > > 
> > > 
> > > > UltraEdit allows for Regular Expressions in
> many
> > > of its search and replace
> > > functions listed under the Search Menu.
> > > >
> > > > Regular expressions allow more complex search
> and
> > > replace functions to be
> > > performed in a single operation.
> > > >
> > > > There are twopossible sets of syntax that may
> be
> > > used.  The first table
> > > below shows the original UltraEdit syntax used
> in
> > > earlier versions of
> > > UltraEdit.  The second table shows the optional
> > > "Unix" style regular
> > > expressions.  This may be enabled from the
> > > ConfigurationSection.
> > > >
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to