Ok i have this to log urls pasted in a channel, then realised that if the same url is pasted twice it still logs it, then i end up with a huge text file.
Can anyone help me so that it if a url matches one already in the text file (Matches every single character) It skips it?

Code:
on ^1:TEXT:*:#: { 
  var %input = $1-
  var %url $regml($regex(%input,/((?:ftp:\/\/|https?:\/\/|www2?\.)[^<>\.\s]+(?:\.[^<>\.\s]+)+(?:\/[^<>\.\s]+)*)/g))
  if ( $regml($regex(%input,/((?:ftp:\/\/|https?:\/\/|www2?\.)[^<>\.\s]+(?:\.[^<>\.\s]+)+(?:\/[^<>\.\s]+)*)/g)) && ( ($len(%url) > 51) )  ) { /tinyurl $regml($regex(%input,/((?:ftp:\/\/|https?:\/\/|www2?\.)[^<>\.\s]+(?:\.[^<>\.\s]+)+(?:\/[^<>\.\s]+)*)/g))
    write system\url.txt $regml(1)  
    echo -a $bit Url logged:00 $regml(1)  
    haltdef
  }
}


Thanks in advance.