extract by delimiter

Thomas McGrath III mcgrath3 at mac.com
Tue Dec 28 23:12:08 EST 2010

By the way I tried all of the examples posted to better see what I was missing. I'm a visual oriented person and so I went with steps I could see. Only one problem in removing leading spaces, I took the lazy way out after getting confused again with multiple repeat loops etc.

So here is what I decided to use for now:

on mouseUp
	put "http://weather.yahooapis.com/forecastrss?w=22664069&u=f" into tTempURL
 	put url tTempURL into field "Source"
	put field 1 into tTemp
	filter tTemp with "*yweather:*"
	replace "<" with "" in tTemp
	replace "/>" with "" in tTemp
	replace "yweather:" with "" in tTemp
	replace quote&space with quote&cr in tTemp -- Did the trick 
	repeat for 5 -- Lazy way to catch leading spaces
       		repeat with x = 1 to the number of lines in tTemp
			if char 1 of line x of tTemp is space then delete char 1 of line x of tTemp
          		if line x of tTemp is quote then delete line x of tTemp
          		if line x of tTemp is "" then delete line x of tTemp
        	end repeat
	end repeat
	if last line of tTemp is "" then delete last line of tTemp
	put tTemp into field "Result"
end mouseUp

I don't mind the quotes in the Result for my other code and I get a nice list of the info I need.

Now I need to write a LAT LON converter to WOEID and or a ZIP Code to WOEID (Yahoo ID scheme)

w=22664069 is for Bethel Park PA

-- Tom McGrath III
3mcgrath at comcast.net

On Dec 28, 2010, at 7:50 PM, Mark Wieder wrote:

> Jeff-
> Tuesday, December 28, 2010, 4:47:02 PM, you wrote:
>> So, most others have sent you excellent suggestions. I just find
>> it funny that the little town you mention just happened to be the
>> place I was born. ;-)
> You could probably save Tom a lot of trouble if you just tell him what
> the weather's like...
> -- 
> -Mark Wieder
> mwieder at ahsoftware.net
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

More information about the Use-livecode mailing list