Re: [WebDNA] suggestion: listwords return xth word

This WebDNA talk-list message is from

2017


It keeps the original formatting.
numero = 113428
interpreted = N
texte = 1022 --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Startcount & endcount ? Sounds like a very useful feature, would save on multiple MIDDLE. It needs more emphasis in the docs as a PARAMETER & DESCRIPTION rather = than a little side note at the bottom. Where else can startcount, endcount be used? http://www.webdna.us/page.dna?numero=3D270 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 25 Feb 2017, at 18:29, christophe.billiottet@webdna.us wrote: >=20 > You could also use [middle] >=20 > [text]myVar=3D_ID:2:firstname[/text] >=20 > [middle endbefore=3D:&endcount=3D-1][myVar][/middle] >
> [middle startafter=3D:&endbefore=3D:][myVar][/middle] >
> [middle startafter=3D:&startcount=3D2][myVar][/middle] >=20 > to extract the values > - chris >=20 >> 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]] >=20 >=20 >=20 >=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 --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Startcount & endcount ?

Sounds like a very useful feature, = would save on multiple MIDDLE.

It needs more emphasis in the docs as a = PARAMETER & DESCRIPTION rather than a little side note at the = bottom.

Where = else can startcount, endcount be used?




Kind regards

Stuart Tremain
Pharoah Lane = Software
AUSTRALIA






On 25 Feb 2017, at 18:29, christophe.billiottet@webdna.us wrote:

You = could also use [middle]

[text]myVar=3D_ID:2:firstname[/text]

[middle endbefore=3D:&endcount=3D-1][myVar][/middle]
<br>
[middle = startafter=3D:&endbefore=3D:][myVar][/middle]
<br>
[middle = startafter=3D:&startcount=3D2][myVar][/middle]

to extract the values
- chris

On Feb 24, 2017, at = 21:56, Brian Burton <brian@burtons.com> wrote:

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]

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]



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]

which is even = shorter to use:
[getword = $D=3D:&$P=3D2&$string=3D[name]]




---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail = to: <talk-leave@webdna.us>
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 --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] suggestion: listwords return xth word (Stuart Tremain 2017)
  2. Re: [WebDNA] suggestion: listwords return xth word (christophe.billiottet@webdna.us 2017)
  3. [WebDNA] suggestion: listwords return xth word (Brian Burton 2017)
1022 --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Startcount & endcount ? Sounds like a very useful feature, would save on multiple MIDDLE. It needs more emphasis in the docs as a PARAMETER & DESCRIPTION rather = than a little side note at the bottom. Where else can startcount, endcount be used? http://www.webdna.us/page.dna?numero=3D270 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 25 Feb 2017, at 18:29, christophe.billiottet@webdna.us wrote: >=20 > You could also use [middle] >=20 > [text]myVar=3D_ID:2:firstname[/text] >=20 > [middle endbefore=3D:&endcount=3D-1][myVar][/middle] >
> [middle startafter=3D:&endbefore=3D:][myVar][/middle] >
> [middle startafter=3D:&startcount=3D2][myVar][/middle] >=20 > to extract the values > - chris >=20 >> 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]] >=20 >=20 >=20 >=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 --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Startcount & endcount ?

Sounds like a very useful feature, = would save on multiple MIDDLE.

It needs more emphasis in the docs as a = PARAMETER & DESCRIPTION rather than a little side note at the = bottom.

Where = else can startcount, endcount be used?




Kind regards

Stuart Tremain
Pharoah Lane = Software
AUSTRALIA






On 25 Feb 2017, at 18:29, christophe.billiottet@webdna.us wrote:

You = could also use [middle]

[text]myVar=3D_ID:2:firstname[/text]

[middle endbefore=3D:&endcount=3D-1][myVar][/middle]
<br>
[middle = startafter=3D:&endbefore=3D:][myVar][/middle]
<br>
[middle = startafter=3D:&startcount=3D2][myVar][/middle]

to extract the values
- chris

On Feb 24, 2017, at = 21:56, Brian Burton <brian@burtons.com> wrote:

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]

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]



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]

which is even = shorter to use:
[getword = $D=3D:&$P=3D2&$string=3D[name]]




---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail = to: <talk-leave@webdna.us>
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 --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD-- . Stuart Tremain

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:

Bug or syntax error on my part? (1997) Quit revisited (1997) Proper file locations (1997) WC Database Format (1997) webcat- multiple selection in input field (1997) WebCatalog can't find database (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) SQL Ref. (1999) Forms Search Questions (1997) redirect within the ErrorMessages.db (2003) Navigator 4.01 (1997) Search/sort in URL Was: GuestBook example (1997) webten vs. webstar (1998) Setting up WebCatalog with Retail Pro data (1996) Web*3 virtual hosting Webcatalog problem (1998) default image if image in code not available (2003) Cannot get subtotal to work (1997) WebDNA tags in WebMerchant email templates ... (1997) Search returns all, not 20 (1997) can't find the pdf (1999)