Re: [WebDNA] suggestion: listwords return xth word
This WebDNA talk-list message is from 2017
It keeps the original formatting.
numero = 113426
interpreted = N
texte = 1020You could also use [middle][text]myVar=3D_ID:2:firstname[/text][middle endbefore=3D:&endcount=3D-1][myVar][/middle]
[middle startafter=3D:&endbefore=3D:][myVar][/middle]
[middle startafter=3D:&startcount=3D2][myVar][/middle]to extract the values- chris> On Feb 24, 2017, at 21:56, Brian Burton
wrote:>=20> Currently, to parse a complex incoming variable (_ID:2:firstname) you =have to jump thru this hoop> [listwords delimiters=3D:&words=3D[name]][showif =[index]=3D2][word][/showif][/listwords]>=20> It would be great if listwords could be told just to kick out one =word, i.e.> [listwords delimiters=3D:&words=3D[name]&index=3D2][word][/listwords]>=20>=20>=20> my function solution is:> [function name=3Dgetword]> -- incoming variables are $string,$D (delimiter),$P (position) --> [return][listwords delimiters=3D[$D]&words=3D[$string]][showif =[index]=3D[$P]][word][/showif][/listwords][/return]> [/function]>=20> which is even shorter to use:> [getword $D=3D:&$P=3D2&$string=3D[name]]---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
Associated Messages, from the most recent to the oldest:
1020You could also use [middle][text]myVar=3D_ID:2:firstname[/text][middle endbefore=3D:&endcount=3D-1][myVar][/middle]
[middle startafter=3D:&endbefore=3D:][myVar][/middle]
[middle startafter=3D:&startcount=3D2][myVar][/middle]to extract the values- chris> On Feb 24, 2017, at 21:56, Brian Burton wrote:>=20> Currently, to parse a complex incoming variable (_ID:2:firstname) you =have to jump thru this hoop> [listwords delimiters=3D:&words=3D[name]][showif =[index]=3D2][word][/showif][/listwords]>=20> It would be great if listwords could be told just to kick out one =word, i.e.> [listwords delimiters=3D:&words=3D[name]&index=3D2][word][/listwords]>=20>=20>=20> my function solution is:> [function name=3Dgetword]> -- incoming variables are $string,$D (delimiter),$P (position) --> [return][listwords delimiters=3D[$D]&words=3D[$string]][showif =[index]=3D[$P]][word][/showif][/listwords][/return]> [/function]>=20> which is even shorter to use:> [getword $D=3D:&$P=3D2&$string=3D[name]]---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
christophe.billiottet@webdna.us
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:
Searching multiple fields from one form field (1997)
WebDNA Promo Sound Bite (2003)
%@#*& back button!!! (1999)
password authentication schemes (2003)
Using Plug-In while running 1.6.1 (1997)
Re:quit command on NT (1997)
test (2004)
Pithy questions on webcommerce & siteedit (1997)
IP Address (2001)
Running _every_ page through WebCat ? (1997)
Catalogs and W* (1996)
WebTen and WebCat (1997)
encrypted database (2004)
[WebDNA] encrypting more than just a credit card number.... (2014)
autocommit problem (1998)
[WebDNA] Date problem in 6.2.1 (2013)
math on date? (1997)
OT (sort of) WAP/WML and 'form' posts (2003)
setting HTTP response header (1998)
For those of you not on the WebCatalog Beta... (1997)