In message <56a1b699dcJohnRW@ukgateway.net>
John Williams <JohnRW@ukgateway.net> wrote:
> In article <0612b1a156.gavin@wra1th.plus.com>,
> Gavin Wraith <gavin@wra1th.plus.com> wrote:
> So you're suggesting that I measure each URL length first, perhaps BGETting
> it until I encounter a terminator, and then DIM a variable accordingly -
> or, actually, a series of concatenating variables as I intend to BPUT them
> later; so I don't really need to have a long variable, just a series of
> suitable GET variables.
Not BGET. You do not need to work byte by byte. Why not GET$?
It is a long time ago since I used BASIC.
Do you know about StrongED scripts? Here is one that replaces the text
in a StrongED window by a list of the URLs occurring in it, ignoring duplicates.
Here it is:
#! lua
local pat, used ="(https?://[^%s\t]+)", { }
for line in io.lines (arg[1]) do
for url in line:gmatch (pat) do
if not used[url] then
print (url)
used[url] = true
end -- if
end -- for
end -- for
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/
No comments:
Post a Comment