Re: find/match not working
- Posted by don cole <doncole at pacbell.net> Aug 17, 2004
- 613 views
Kat wrote:
> 
> I have a list of urls, contained in urllist like:
> urllist[1], urllist[2]..urllist[x]
> 
> and i tried eliminating duplicates before they are added, by using find, which
>
> didn't work. Now i am using 
> 
> found = 0
> for loop = 1 to length(urllist) do
>   if match(junk,urllist[loop]) then
>      found = 1
>      exit
>    end if
>  end for
>  if not found then
>    urllist = urllist & {junk}
>   end if
> 
> And darned if i still don't get duplicates. I do trim off leading and trailing
>
> spaces from junk. Why is this happening?
> 
> Kat
> 
> 
integer a sequence newlist,found newlist={} found={} for loop=1 to length(urllist) do a=find(urllist[loop],found)) if a=0 then newlist=append(newlist,urllist[loop]) found=append(found,urllist[loop]) end if end for
new list should have no duplicates don cole SF }}}
 
		
