Re: [WebDNA] Has [middle] always worked this way?
This WebDNA talk-list message is from 2014
It keeps the original formatting.
numero = 111540
interpreted = N
texte = The explanation in my previous email describes how I thought itworked. Obviously I was wrong, but now I know how it actuallyworks, so ...I'll use [hideif [url][ts][/url]^abc][break][/hideif] immediatelybefore the ending [/loop] tag to stop the loop when the 'ts' valueno longer has any abc's in it.Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server ManagementOn 08/27/2014 09:01 AM, Toby Cox wrote:> when you get to index 4, the value of ts = abc000> > it then prints out 000 as you do the [middle] function which> strips out the string 'abc'> > Therefore, at index 5, the value of ts=000> > It then cannot middle startafter=abc as ‘abc' is no longer in> the variable [ts], so it keeps printing out 000> > What you probably need to do is check for the presence of abc> in your variable by using [CountWords delimiters=abc]> > > > TC> > > On 27 Aug 2014, at 14:47, Kenneth Grome>
wrote:> >> I never know what's in the "ts" string so I don't really have>> an option to use endbefore with a value. However, I just>> tested it with a blank value (endbefore=) and it gave me the>> same results as before.>> >> Regards, Kenneth Grome WebDNA Solutions >> http://www.webdnasolutions.com Web Database Systems and Linux>> Server Management>> >> >> On 08/27/2014 07:23 AM, Dan Strong wrote:>>> 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 >>> >>> --------------------------------------------------------->>> 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> > --------------------------------------------------------- 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:
The explanation in my previous email describes how I thought itworked. Obviously I was wrong, but now I know how it actuallyworks, so ...I'll use [hideif [url][ts][/url]^abc][break][/hideif] immediatelybefore the ending [/loop] tag to stop the loop when the 'ts' valueno longer has any abc's in it.Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server ManagementOn 08/27/2014 09:01 AM, Toby Cox wrote:> when you get to index 4, the value of ts = abc000> > it then prints out 000 as you do the [middle] function which> strips out the string 'abc'> > Therefore, at index 5, the value of ts=000> > It then cannot middle startafter=abc as ‘abc' is no longer in> the variable [ts], so it keeps printing out 000> > What you probably need to do is check for the presence of abc> in your variable by using [CountWords delimiters=abc]> > > > TC> > > On 27 Aug 2014, at 14:47, Kenneth Grome> wrote:> >> I never know what's in the "ts" string so I don't really have>> an option to use endbefore with a value. However, I just>> tested it with a blank value (endbefore=) and it gave me the>> same results as before.>> >> Regards, Kenneth Grome WebDNA Solutions >> http://www.webdnasolutions.com Web Database Systems and Linux>> Server Management>> >> >> On 08/27/2014 07:23 AM, Dan Strong wrote:>>> 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 >>> >>> --------------------------------------------------------->>> 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> > --------------------------------------------------------- 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:
form data submission gets truncated (1997)
RE: Javascripts (1998)
WebCat Error Log problem (2.0.1, acgi, Mac) (1997)
[WebDNA] WebDNA Crashing or Not **YES** (2008)
WebDNA 5 - Privacy Issue (Built in sniffer) (2003)
WebMerchant 1.6 and SHTML (1997)
Cart Unique After Rolling Back Time? (2001)
Setting up WebCatalog with Retail Pro data (1996)
Calculating Shipping (1997)
MATH PROBLEM (1997)
Using [Include] Context (1999)
[WebDNA] Add to Cart,/ show cart: unable to access page (2016)
SPAM (OT) (2004)
test - list issues? (2003)
Dark Horse Comics success story (1997)
Potential Conflicts? (1997)
FEATURE REQUEST: Auto Resizing of images (2002)
emailer w/F2 (1997)
what run level should S90WebCatalog be at? (2003)
WebCat2b12 CGI Mac - [shownext] problem (1997)