Re: find/match not working

new topic     » goto parent     » topic index » view thread      » older message » newer message

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
> 
> 


Hi

I seem to remember having a problem like this to - try taking off the first and
last character of junk and see what happens

eg
 found = 0
 for loop = 1 to length(urllist) do
   if match(junk[2..length(junk)-1,urllist[loop]) then
      found = 1
      exit
    end if
  end for
  if not found then
    urllist = urllist & {junk}
   end if


assuming that hunk is a full url, or the match isn't THAT critical

Chris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu