02-04-2014, 12:14 PM
I have a small problem. It says "invalid index". The offending code is at the bottom. The rest is there for context.
Thanks for reading.
;init array of strings, l
ARRAY(str) list_of_urls
int i
str pattern=
;<div class="morefg">\r\n.*<a href="(.*)">Read more
if(0=findrx(s pattern 1 4 list_of_urls)) end "not found"
;deletes urls that don't match domain
str d="domain.com"
for i 0 list_of_urls.len
if find(list_of_urls[1 i] d) = -1
list_of_urls.remove(1 i)
Thanks for reading.