extract by delimiter
Warren Samples
warren at warrensweb.us
Tue Dec 28 18:21:03 EST 2010
On Tue, 2010-12-28 at 17:58 -0500, Thomas McGrath III wrote:
> I am stuck. I've been trying to extract text from an RSS feed and so far I have the information I need but am stuck at extracting it into a better format. Here is what I have so far:
>
> location city="Bethel Park" region="PA" country="United States"
> units temperature="F" distance="mi" pressure="in" speed="mph"
> wind chill="21" direction="250" speed="10"
> atmosphere humidity="51" visibility="10" pressure="30.04" rising="1"
> astronomy sunrise="7:39 am" sunset="4:58 pm"
> condition text="Cloudy" code="26" temp="30" date="Tue, 28 Dec 2010 4:52 pm EST"
> forecast day="Tue" date="28 Dec 2010" low="22" high="30" text="Mostly Cloudy" code="27"
> forecast day="Wed" date="29 Dec 2010" low="25" high="32" text="Mostly Cloudy" code="28"
>
> I can't delimit with space as "location city" has a space in it.
> I can't use = because then I get " "Bethel Park" region" instead of just "Bethel Park"
>
> I am trying to figure out how to exclude items in between " " and then replace space with "_" and then use space to delimit.
>
> Any ideas on how to exclude between " "s ?
>
> Thanks for your help,
>
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> 3mcgrath at comcast.net
You could set the itemDel to " and add a counter to track odd/even and
delete/modify as appropriate using for each line and for each item. Not
sure how efficient this is, but it's an idea :)
Warren
More information about the use-livecode
mailing list