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

This WebDNA talk-list message is from

2014


It keeps the original formatting.
numero = 111536
interpreted = N
texte = This is a multi-part message in MIME format. --------------000902000003000103000507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I'm not following... wouldn't [grep] remove every instance? 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 > --------------000902000003000103000507 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I'm not following... wouldn't [grep] remove every instance?

Kenneth Grome wrote:
I was trying to using this code to extract all the occurrences ofabc 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-123abc456abc789abc0002-456abc789abc0003-789abc0004-0005-6-7-8-9-But instead I got this:1-123abc456abc789abc0002-456abc789abc0003-789abc0004-0005-0006-0007-0008-0009-000I had expected middle to produce blank/empty results when it couldnot find the first occurrence of abc, but instead it returned theentire ts value.Has middle always worked like this, and I have simply never usedmiddle in this manner during 20 years of WebDNA programming?Or is this a glitch or bug?Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server Management---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us  
--------------000902000003000103000507-- 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)
This is a multi-part message in MIME format. --------------000902000003000103000507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I'm not following... wouldn't [grep] remove every instance? 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 > --------------000902000003000103000507 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I'm not following... wouldn't [grep] remove every instance?

Kenneth Grome wrote:
I was trying to using this code to extract all the occurrences ofabc 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-123abc456abc789abc0002-456abc789abc0003-789abc0004-0005-6-7-8-9-But instead I got this:1-123abc456abc789abc0002-456abc789abc0003-789abc0004-0005-0006-0007-0008-0009-000I had expected middle to produce blank/empty results when it couldnot find the first occurrence of abc, but instead it returned theentire ts value.Has middle always worked like this, and I have simply never usedmiddle in this manner during 20 years of WebDNA programming?Or is this a glitch or bug?Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server Management---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us  
--------------000902000003000103000507-- WebDNA

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:

unsubscribe (2000) [WebDNA] Accepting Payments on Site (2013) Problems with [Applescript] (1997) [WebDNA] webdna.us (2008) [WebDNA] Sorry WebDNA server not running - September 2019 Edition (2019) Order File Format (2004) WCS Newbie question (1997) emailer (1997) [lineitems] and [writefile] (1998) [WebDNA] How do we tell what's misconfigured? Or which WebDNA 7 version to use? (2011) Using [purchase] (1998) Summing fields (1997) Limit to Field Length in DB (1998) Size images (2002) Pithy questions on webcommerce & siteedit (1997) 06/06/2000 bug warning ... (2000) using showpage and showcart commands (1996) Bill To - Ship To Information display (1997) quantity minimum problem (1997) Tried installing Windows beta with no success... (2000)