Witango DOES support an exellent Regex that supports replace,
backreferences, ect.
That's because Witango supports JavaScript on the server side
So you can write your own RegEx bases search/replace with backreferences in
just a few lines of code:

<@SCRIPT>
var initStr = server.getVariable('myWitangoString');
var myRgx = /([/d]*)/g
var outVariable = initStr.replace(mRgx,"$1")
server.setVariable('myWitangoString',outVariable);
...
You can use my RegEx expression help tool here:
http://www.humphreys.org/regex/regex2.htm

Witango also has ok support for formatting numbers with the
FORMAT="num:0,0,0,0,0,0,0,0" and @PAD
No, it's Not Printf(), but it's a start. If you need something a lot
different, you could roll your own, In JavaScript, or otherwise, and re-use
in many more of your Witango projects down the line.

And as for having deficiencies in formating dates or times, when I ran the
atatched tml files, I saw no deficiencies. This is shown in the html that
was output, also attached.

Anthony -


----- Original Message ----- 
From: "William M Conlon" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, 31 January, 2007 15:57
Subject: Re: Witango-Talk: Bug: datetime:%M


> I think you're right.
>
> What I get out of this is;
> * Witango should correctly handle leading zeroes for dates and times
> * formatting should be more flexible to allow numbers to formatted
> instead of translated (perl has some good code for this)
> * provide a different regex interface supports substitution and
> backtracking.
>
> Bill
>
> On Jan 31, 2007, at 12:45 PM, Robert Shubert wrote:
>
> > I think in this case Witango is failing to identify your variable as a
> > date/time format and just passing the input back out unformatted.
> >
> > Robert
> >
> > -----Original Message-----
> > From: William M Conlon [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, January 31, 2007 3:39 PM
> > To: Witango-Talk
> > Subject: Witango-Talk: Bug: datetime:%M
> >
> > The manual reports that datetime:%M outputs results in [00:59]
> >
> >
> > But this test case shows several bugs:
> > 1.  Single digit numbers are output without leading zeroes --
> > contradicting the purported formatting
> > 2.  Numbers are not modulo 60 -- numbers 60 and above are output in
> > full.
> >
> > Here are a few snips:
> >
> > 1, 1, 1
> > 2, 2, 2
> > 3, 3, 3
> > 4, 4, 4
> > 5, 5, 5
> > 6, 6, 6
> > 7, 7, 7
> > 8, 8, 8
> > 9, 9, 9
> > 10, 10, 10
> >
> > 97, 97, 97
> > 98, 98, 98
> > 99, 99, 99
> > 100, 100, 100
> > 101, 101, 101
> > 102, 102, 102
> >
> >
> > ***** TEST CASE ****
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> > <HTML>
> > <HEAD>
> > <TITLE></TITLE>
> > </HEAD>
> > <BODY>
> > <@FOR START=1 STOP=120>
> > <@ASSIGN SCOPE="request" NAME="i" VALUE="<@CURROW>">
> > <@CURROW>, @@i, <@VAR SCOPE="request" NAME="i" FORMAT="datetime:%
> > M"><br>
> > </@FOR>
> > </BODY>
> > </HTML>
> >
> > Bill
> >
> > William M. Conlon, P.E., Ph.D.
> > To the Point
> > 2330 Bryant Street
> > Palo Alto, CA 94301
> >     vox:  650.327.2175 (direct)
> >     fax:  650.329.8335
> > mobile:  650.906.9929
> > e-mail:  mailto:[EMAIL PROTECTED]
> >     web:  http://www.tothept.com
> >
> > ______________________________________________________________________
> > __
> > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> >
> > ______________________________________________________________________
> > __
> > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> >
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Attachment: ntimedateformat.tml
Description: Binary data

DatesTimes
2007-01-01 00:01:01
2007-01-02 00:01:02
2007-01-03 00:01:03
2007-01-04 00:01:04
2007-01-05 00:01:05
2007-01-06 00:01:06
2007-01-07 00:01:07
2007-01-08 00:01:08
2007-01-09 00:01:09
2007-01-10 00:01:10
2007-01-11 00:01:11
2007-01-12 00:01:12
2007-02-01 00:02:01
2007-02-02 00:02:02
2007-02-03 00:02:03
2007-02-04 00:02:04
2007-02-05 00:02:05
2007-02-06 00:02:06
2007-02-07 00:02:07
2007-02-08 00:02:08
2007-02-09 00:02:09
2007-02-10 00:02:10
2007-02-11 00:02:11
2007-02-12 00:02:12
2007-03-01 00:03:01
2007-03-02 00:03:02
2007-03-03 00:03:03
2007-03-04 00:03:04
2007-03-05 00:03:05
2007-03-06 00:03:06
2007-03-07 00:03:07
2007-03-08 00:03:08
2007-03-09 00:03:09
2007-03-10 00:03:10
2007-03-11 00:03:11
2007-03-12 00:03:12
2007-04-01 00:04:01
2007-04-02 00:04:02
2007-04-03 00:04:03
2007-04-04 00:04:04
2007-04-05 00:04:05
2007-04-06 00:04:06
2007-04-07 00:04:07
2007-04-08 00:04:08
2007-04-09 00:04:09
2007-04-10 00:04:10
2007-04-11 00:04:11
2007-04-12 00:04:12
2007-05-01 00:05:01
2007-05-02 00:05:02
2007-05-03 00:05:03
2007-05-04 00:05:04
2007-05-05 00:05:05
2007-05-06 00:05:06
2007-05-07 00:05:07
2007-05-08 00:05:08
2007-05-09 00:05:09
2007-05-10 00:05:10
2007-05-11 00:05:11
2007-05-12 00:05:12
2007-06-01 00:06:01
2007-06-02 00:06:02
2007-06-03 00:06:03
2007-06-04 00:06:04
2007-06-05 00:06:05
2007-06-06 00:06:06
2007-06-07 00:06:07
2007-06-08 00:06:08
2007-06-09 00:06:09
2007-06-10 00:06:10
2007-06-11 00:06:11
2007-06-12 00:06:12
2007-07-01 00:07:01
2007-07-02 00:07:02
2007-07-03 00:07:03
2007-07-04 00:07:04
2007-07-05 00:07:05
2007-07-06 00:07:06
2007-07-07 00:07:07
2007-07-08 00:07:08
2007-07-09 00:07:09
2007-07-10 00:07:10
2007-07-11 00:07:11
2007-07-12 00:07:12
2007-08-01 00:08:01
2007-08-02 00:08:02
2007-08-03 00:08:03
2007-08-04 00:08:04
2007-08-05 00:08:05
2007-08-06 00:08:06
2007-08-07 00:08:07
2007-08-08 00:08:08
2007-08-09 00:08:09
2007-08-10 00:08:10
2007-08-11 00:08:11
2007-08-12 00:08:12
2007-09-01 00:09:01
2007-09-02 00:09:02
2007-09-03 00:09:03
2007-09-04 00:09:04
2007-09-05 00:09:05
2007-09-06 00:09:06
2007-09-07 00:09:07
2007-09-08 00:09:08
2007-09-09 00:09:09
2007-09-10 00:09:10
2007-09-11 00:09:11
2007-09-12 00:09:12
2007-10-01 00:10:01
2007-10-02 00:10:02
2007-10-03 00:10:03
2007-10-04 00:10:04
2007-10-05 00:10:05
2007-10-06 00:10:06
2007-10-07 00:10:07
2007-10-08 00:10:08
2007-10-09 00:10:09
2007-10-10 00:10:10
2007-10-11 00:10:11
2007-10-12 00:10:12
2007-11-01 00:11:01
2007-11-02 00:11:02
2007-11-03 00:11:03
2007-11-04 00:11:04
2007-11-05 00:11:05
2007-11-06 00:11:06
2007-11-07 00:11:07
2007-11-08 00:11:08
2007-11-09 00:11:09
2007-11-10 00:11:10
2007-11-11 00:11:11
2007-11-12 00:11:12
2007-12-01 00:12:01
2007-12-02 00:12:02
2007-12-03 00:12:03
2007-12-04 00:12:04
2007-12-05 00:12:05
2007-12-06 00:12:06
2007-12-07 00:12:07
2007-12-08 00:12:08
2007-12-09 00:12:09
2007-12-10 00:12:10
2007-12-11 00:12:11
2007-12-12 00:12:12

Reply via email to