grep / [middle] help

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 53181
interpreted = N
texte = We've been getting data items that look like this: News Article Headline - News Source .... but a majority of New Jerseyans favor something else entirely. Some more body copy goes here. We needed to pull the data out into individual fields, and this worked to do that: [text]my_head=[Middle StartAfter=&EndBefore=<][item][/middle][/text] [text]my_link=[Middle StartAfter=<&EndBefore=>][item][/middle][/text] [text]my_intro=[Middle StartAfter=>&EndBefore=][item][/middle][/text] But now our source has changed the format to this: News Article Headline News Source .... but a majority of New Jerseyans favor something else entirely. Some more body copy goes here. And we're screwed becasue there's no way to get [middle] to work on specific carriage returns at the end of each of the lines. And the number of lines of body copy is variable. I'm thinking that grep is our friend, but we're rushed to put this into service. Anyone have a grep to break the new format into it's components? Thanks, ~joe -- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Century webhosting ~ co-location ~ wireless access ~ WebCat programming ------------------------------------------------------------- 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)
  2. grep / [middle] help ( Joe D'Andrea 2003)
We've been getting data items that look like this: News Article Headline - News Source .... but a majority of New Jerseyans favor something else entirely. Some more body copy goes here. We needed to pull the data out into individual fields, and this worked to do that: [text]my_head=[Middle StartAfter=&EndBefore=<][item][/middle][/text] [text]my_link=[Middle StartAfter=<&EndBefore=>][item][/middle][/text] [text]my_intro=[Middle StartAfter=>&EndBefore=][item][/middle][/text] But now our source has changed the format to this: News Article Headline News Source .... but a majority of New Jerseyans favor something else entirely. Some more body copy goes here. And we're screwed becasue there's no way to get [middle] to work on specific carriage returns at the end of each of the lines. And the number of lines of body copy is variable. I'm thinking that grep is our friend, but we're rushed to put this into service. Anyone have a grep to break the new format into it's components? Thanks, ~joe -- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Century webhosting ~ co-location ~ wireless access ~ WebCat programming ------------------------------------------------------------- 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:

Migrating to NT (1997) 2.0.1 new commands and contexts (1997) Ok here is a question? (1997) [OT] What log analyzer do you use? (2000) How bad an idea is it to put cart=[cart] on all links? (2000) WebDNA & Sambar (2007) Plugin or CGI or both (1997) URGENT: WebDNA Server Not Running (2003) HELP! 10K hits per hour for pages that no longer exist! (2000) Cancel Subscription (1996) [WebDNA] Store module/site (2012) WebCat Admin access w/ClearlyHome p.i. (1997) Creating folders and deleting files (1997) frames & carts (1997) Encrypt/Decrypt (2007) Frames and WebCat (1997) Cart# (1997) Off Topic: SNMP over TCP/IP (1998) OFF-TOPIC: Check www.godaddy.com for me ... (2003) Can't Update records (1997)