Re: grep / [middle] help SOLVED

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 53193
interpreted = N
texte = Well grep was no help most likely because I have no clue. What I ended up doing was using a [listwords...] with a carriage return as the delimiter incrementing a counter as it went. That got me all the lines broken into "words". I know that line1 and line2 are the headline and source, so I combined them to make what I needed. I also know that the line that corresponds to the counter is the link link, so that one was easy. Then I used a [loop...] context to get the 3rd through counter-1 lines to form the body copy. like this: [math show=f]myCount=0[/math] [ListWords Words=[item]&Delimiters= ] [text]line[index]=[word][/text] [!][index]: [word]

[/!] [math show=f]myCount=myCount+1[/math] [/ListWords]

Line Count=[myCount] [text]my_head=[line1] - [line2][/text] [text]my_link=[Middle StartAfter=<&EndBefore=>][interpret][line[myCount]][/interpret][/middle][/text] [text]my_intro=[loop start=3&end=[math]myCount-1[/math]][interpret][line[index]][/interpret] [/loop][/text] ~joe ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: grep / [middle] help SOLVED ( Joe D'Andrea 2003)
Well grep was no help most likely because I have no clue. What I ended up doing was using a [listwords...] with a carriage return as the delimiter incrementing a counter as it went. That got me all the lines broken into "words". I know that line1 and line2 are the headline and source, so I combined them to make what I needed. I also know that the line that corresponds to the counter is the link link, so that one was easy. Then I used a [loop...] context to get the 3rd through counter-1 lines to form the body copy. like this: [math show=f]myCount=0[/math] [ListWords Words=[item]&Delimiters= ] [text]line[index]=[word][/text] [!][index]: [word]

[/!] [math show=f]myCount=myCount+1[/math] [/ListWords]

Line Count=[myCount] [text]my_head=[line1] - [line2][/text] [text]my_link=[Middle StartAfter=<&EndBefore=>][interpret][line[myCount]][/interpret][/middle][/text] [text]my_intro=[loop start=3&end=[math]myCount-1[/math]][interpret][line[index]][/interpret] [/loop][/text] ~joe ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Joe D'Andrea

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:

WebMerchant Problem... (1999) Adding Message to Order (1997) WebCat Contest Now: Encrypt and Sell (1998) # fields limited? (1997) PCS Emailer's role ? (1997) Looking for 5 to 12 shops with 3 URLs & statements (1997) Bug? I don't know... (1999) Help! WebCat2 bug (1997) wild question (1998) Secure Server (1997) Help with Repost Data msg from form (1997) WebCatalog for guestbook ? (1997) [WebDNA] Snow Leopard and v7 (2011) [Sum] function? (1997) [include] error message (was:how to put/keep product customization info in basket?) (1998) Webcat causing crashes left and right! (1997) RE: 2nd WebCatalog2 Feature Request (1996) [WebDNA] Credit card processing (2012) restarting service remotely on NT (1997) Summary search -- speed (1997)