Re: [WebDNA] Has [middle] always worked this way?

This WebDNA talk-list message is from

2014


It keeps the original formatting.
numero = 111535
interpreted = N
texte = --001a11c1e6aaaa446a05019b7d49 Content-Type: text/plain; charset=UTF-8 What happens if you add &endBefore? ------------------------------------ Sent from phone -Dan Strong http://DanStrong.com On Aug 27, 2014 4:08 AM, "Kenneth Grome" wrote: > I was trying to using this code to extract all the occurrences of > abc from the original ts value: > > [text]ts=abc123abc456abc789abc000[/text] > > [loop start=1&end=9] > [text]ts=[middle startafter=abc][ts][/middle][/text] > [appendfile lines][index]-[ts] > [/writefile] > [/loop] > > I was expecting this: > > 1-123abc456abc789abc000 > 2-456abc789abc000 > 3-789abc000 > 4-000 > 5- > 6- > 7- > 8- > 9- > > But instead I got this: > > 1-123abc456abc789abc000 > 2-456abc789abc000 > 3-789abc000 > 4-000 > 5-000 > 6-000 > 7-000 > 8-000 > 9-000 > > I had expected middle to produce blank/empty results when it could > not find the first occurrence of abc, but instead it returned the > entire ts value. > > Has middle always worked like this, and I have simply never used > middle in this manner during 20 years of WebDNA programming? > > Or is this a glitch or bug? > > Regards, > Kenneth Grome > WebDNA Solutions > http://www.webdnasolutions.com > Web Database Systems and Linux Server Management > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > --001a11c1e6aaaa446a05019b7d49 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

What happens if you add &endBefore?

------------------------------------
Sent from phone

-Dan Strong
http://DanStrong.com

--001a11c1e6aaaa446a05019b7d49-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Has [middle] always worked this way? (Kenneth Grome 2014)
  2. Re: [WebDNA] Has [middle] always worked this way? (Toby Cox 2014)
  3. Re: [WebDNA] Has [middle] always worked this way? (Kenneth Grome 2014)
  4. Re: [WebDNA] Has [middle] always worked this way? (Kenneth Grome 2014)
  5. Re: [WebDNA] Has [middle] always worked this way? (WebDNA 2014)
  6. Re: [WebDNA] Has [middle] always worked this way? (Dan Strong 2014)
  7. [WebDNA] Has [middle] always worked this way? (Kenneth Grome 2014)
--001a11c1e6aaaa446a05019b7d49 Content-Type: text/plain; charset=UTF-8 What happens if you add &endBefore? ------------------------------------ Sent from phone -Dan Strong http://DanStrong.com On Aug 27, 2014 4:08 AM, "Kenneth Grome" wrote: > I was trying to using this code to extract all the occurrences of > abc from the original ts value: > > [text]ts=abc123abc456abc789abc000[/text] > > [loop start=1&end=9] > [text]ts=[middle startafter=abc][ts][/middle][/text] > [appendfile lines][index]-[ts] > [/writefile] > [/loop] > > I was expecting this: > > 1-123abc456abc789abc000 > 2-456abc789abc000 > 3-789abc000 > 4-000 > 5- > 6- > 7- > 8- > 9- > > But instead I got this: > > 1-123abc456abc789abc000 > 2-456abc789abc000 > 3-789abc000 > 4-000 > 5-000 > 6-000 > 7-000 > 8-000 > 9-000 > > I had expected middle to produce blank/empty results when it could > not find the first occurrence of abc, but instead it returned the > entire ts value. > > Has middle always worked like this, and I have simply never used > middle in this manner during 20 years of WebDNA programming? > > Or is this a glitch or bug? > > Regards, > Kenneth Grome > WebDNA Solutions > http://www.webdnasolutions.com > Web Database Systems and Linux Server Management > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > --001a11c1e6aaaa446a05019b7d49 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

What happens if you add &endBefore?

------------------------------------
Sent from phone

-Dan Strong
http://DanStrong.com

On Aug 27, 2014 4:08 AM, "Kenneth Grome&quo= t; <ken@webdnasolutions.com> wrote:
I was trying to using this code to extract all the occurrences of
abc from the original ts value:

[text]ts=3Dabc123abc456abc789abc000[/text]

[loop start=3D1&end=3D9]
[text]ts=3D[middle startafter=3Dabc][ts][/middle][/text]
[appendfile lines][index]-[ts]
[/writefile]
[/loop]

I was expecting this:

1-123abc456abc789abc000
2-456abc789abc000
3-789abc000
4-000
5-
6-
7-
8-
9-

But instead I got this:

1-123abc456abc789abc000
2-456abc789abc000
3-789abc000
4-000
5-000
6-000
7-000
8-000
9-000

I had expected middle to produce blank/empty results when it could
not find the first occurrence of abc, but instead it returned the
entire ts value.

Has middle always worked like this, and I have simply never used
middle in this manner during 20 years of WebDNA programming?

Or is this a glitch or bug?

Regards,
Kenneth Grome
WebDNA Solutions
http://www.web= dnasolutions.com
Web Database Systems and Linux Server Management

---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us&g= t;.
To unsubscribe, E-mail to: <talk= -leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: support@webdna.us
--001a11c1e6aaaa446a05019b7d49-- Dan Strong

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Search over 500 (2000) WebCat2 beta 11 - new prefs ... (1997) Separate SSL Server (1997) unusual search problem (1998) Numbers only code (2000) FYI: virus alert (1996) WebCatalog for guestbook ? (1997) Up and running ... at last !! (1997) this works sometimes and sometimes not (1997) Stat analyzer (1997) Uh...can someone help me out with the b10? (1997) WCS Newbie question (1997) WebCommerce: Folder organization ? (1997) WebCatalog can't find database (1997) WebCat2b12 CGI Mac - [shownext] problem (1997) PCS Frames (1997) RequiredFields template (1997) Search/sort in URL Was: GuestBook example (1997) Generating Options for a Form. (1997) Web Catalog vs. ICAT (1997)