Re: [WebDNA] Has [middle] always worked this way?
This WebDNA talk-list message is from 2014
It keeps the original formatting.
numero = 111538
interpreted = N
texte = I'm not trying to remove every instance, I'm just trying to findthem, one at a time, inside the loop ... and middle is the correcttool for this purpose. I'm just surprised to get "000" ratherthan a blank/empty value after the final "abc" has been removedfrom the 'ts' value, that's all.If this is not a bug then maybe middle has always worked likethis. I just figured that it started looking for the match stringbeginning with the first character of the 'ts' value, and then itignored every character it had already looked at -- until iteither found the match string or failed to find it.Either way, I thought it would return only the chars that had notyet been looked at ... but that's apparently not the case.Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server ManagementOn 08/27/2014 08:20 AM, WebDNA wrote:> 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>> > --------------------------------------------------------- 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
Associated Messages, from the most recent to the oldest:
I'm not trying to remove every instance, I'm just trying to findthem, one at a time, inside the loop ... and middle is the correcttool for this purpose. I'm just surprised to get "000" ratherthan a blank/empty value after the final "abc" has been removedfrom the 'ts' value, that's all.If this is not a bug then maybe middle has always worked likethis. I just figured that it started looking for the match stringbeginning with the first character of the 'ts' value, and then itignored every character it had already looked at -- until iteither found the match string or failed to find it.Either way, I thought it would return only the chars that had notyet been looked at ... but that's apparently not the case.Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server ManagementOn 08/27/2014 08:20 AM, WebDNA wrote:> 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>> > --------------------------------------------------------- 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
Kenneth Grome
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:
Too Many Items found (2000)
HomePage Caution (1997)
Modifying order output (1997)
b12 cannot limit records returned and more. (1997)
WebCat2 - Getting to the browser's username/password data (1997)
[cart] tag (2000)
WebCatalog Review (2001)
WebCat2final1 crashes (1997)
New Plug-in and Type 11 errors (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Changing Date Format in Field (1999)
WebCat2 - [format thousands] (1997)
Multiple catalog databases and showcart (1997)
WebDNA Server Not Running (2005)
Add to Cart & List of Products (1997)
taxRate is fine but taxTotal isn't (1997)
Autonumber (2003)
Re:Emailer Set Up (1997)
Setting up shop (1997)
Search/sort in URL Was: GuestBook example (1997)