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

This WebDNA talk-list message is from

2014


It keeps the original formatting.
numero = 111539
interpreted = N
texte = when you get to index 4, the value of ts =3D 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=3D000 It then cannot middle startafter=3Dabc as =91abc' 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=3Dabc] 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=3D) and it gave me the same results as > before. >=20 > Regards, > Kenneth Grome > WebDNA Solutions > http://www.webdnasolutions.com > Web Database Systems and Linux Server Management >=20 >=20 > On 08/27/2014 07:23 AM, Dan Strong wrote: >> What happens if you add &endBefore? >>=20 >> ------------------------------------ >> Sent from phone >>=20 >> -Dan Strong >> http://DanStrong.com >>=20 >> On Aug 27, 2014 4:08 AM, "Kenneth Grome" > > wrote: >>=20 >> I was trying to using this code to extract all the occurrences of >> abc from the original ts value: >>=20 >> [text]ts=3Dabc123abc456abc789abc000[/text] >>=20 >> [loop start=3D1&end=3D9] >> [text]ts=3D[middle startafter=3Dabc][ts][/middle][/text] >> [appendfile lines][index]-[ts] >> [/writefile] >> [/loop] >>=20 >> I was expecting this: >>=20 >> 1-123abc456abc789abc000 >> 2-456abc789abc000 >> 3-789abc000 >> 4-000 >> 5- >> 6- >> 7- >> 8- >> 9- >>=20 >> But instead I got this: >>=20 >> 1-123abc456abc789abc000 >> 2-456abc789abc000 >> 3-789abc000 >> 4-000 >> 5-000 >> 6-000 >> 7-000 >> 8-000 >> 9-000 >>=20 >> 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. >>=20 >> Has middle always worked like this, and I have simply never used >> middle in this manner during 20 years of WebDNA programming? >>=20 >> Or is this a glitch or bug? >>=20 >> Regards, >> Kenneth Grome >> WebDNA Solutions >> http://www.webdnasolutions.com >> Web Database Systems and Linux Server Management >>=20 >> --------------------------------------------------------- >> 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 >>=20 >> --------------------------------------------------------- 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:

    
  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)
when you get to index 4, the value of ts =3D 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=3D000 It then cannot middle startafter=3Dabc as =91abc' 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=3Dabc] 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=3D) and it gave me the same results as > before. >=20 > Regards, > Kenneth Grome > WebDNA Solutions > http://www.webdnasolutions.com > Web Database Systems and Linux Server Management >=20 >=20 > On 08/27/2014 07:23 AM, Dan Strong wrote: >> What happens if you add &endBefore? >>=20 >> ------------------------------------ >> Sent from phone >>=20 >> -Dan Strong >> http://DanStrong.com >>=20 >> On Aug 27, 2014 4:08 AM, "Kenneth Grome" > > wrote: >>=20 >> I was trying to using this code to extract all the occurrences of >> abc from the original ts value: >>=20 >> [text]ts=3Dabc123abc456abc789abc000[/text] >>=20 >> [loop start=3D1&end=3D9] >> [text]ts=3D[middle startafter=3Dabc][ts][/middle][/text] >> [appendfile lines][index]-[ts] >> [/writefile] >> [/loop] >>=20 >> I was expecting this: >>=20 >> 1-123abc456abc789abc000 >> 2-456abc789abc000 >> 3-789abc000 >> 4-000 >> 5- >> 6- >> 7- >> 8- >> 9- >>=20 >> But instead I got this: >>=20 >> 1-123abc456abc789abc000 >> 2-456abc789abc000 >> 3-789abc000 >> 4-000 >> 5-000 >> 6-000 >> 7-000 >> 8-000 >> 9-000 >>=20 >> 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. >>=20 >> Has middle always worked like this, and I have simply never used >> middle in this manner during 20 years of WebDNA programming? >>=20 >> Or is this a glitch or bug? >>=20 >> Regards, >> Kenneth Grome >> WebDNA Solutions >> http://www.webdnasolutions.com >> Web Database Systems and Linux Server Management >>=20 >> --------------------------------------------------------- >> 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 >>=20 >> --------------------------------------------------------- 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 Toby Cox

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:

all records returned. (1997) Location of Webcat site in folder hierarchy (1997) New Site Announcement (1998) Formvariables + Netscape + Frame Set = Confusion (2000) Search in 2 or more catalogs (1997) Why doesn't it change? (1998) Lastautonumber (2005) WC2b15 File Corruption (1997) Help with database strategy (1998) [protect] on NT? (1997) Loops N Variables (1998) Help name our technology! I found it (1997) default value from Lookup (was Grant, please help me) (1997) Add message to Order (1997) [OT] JavaScript Error (2002) Help SM: Duplicate cart #'s - still! (2003) Updating checkboxes made easy !!! (1998) U&P IIS concept (1998) question: webdelivery folder and file (1997) For those of you not on the WebCatalog Beta... (1997)