What happens if you add &endBefore?
------------------------------------
Sent from phone
-Dan Strong
http://DanStrong.com
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
|
What happens if you add &endBefore?
------------------------------------
Sent from phone
-Dan Strong
http://DanStrong.com
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
DOWNLOAD WEBDNA NOW!
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...