Grab Url
Posted by HellRaz0r
Saturday, September 16, 2006
Description: Grabs urls from a string of text :)


#This script will grab all the urls in a string and will return them like this #"http://url-1.com/soming www.someurl.com"
#$graburls(Some Text with Urls in)
alias graburls {
  if $regex($1-,/(?=(http://[^\s]+|www\.[^\s]+\.\S+))/g) {
    var %x 1
    while ($regml(%x)) {
       if (!%y) var %y $regml(%x)
       else var %y = %y $regml(%x)
       inc %x
    }
  }
  return %y
}
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world