Get a url from a string
I would like to be able to find the url(s) in the given string. It does not always have http:// before it and it's not always a .com domain, so it's a little tricky. I don't care if this find things such as ASP.net or 5.6 because it's how it's going to work.
So basically, i need a way to strip out strings that have a period in them with no space before or after the period. For example, the following string would output the following (possible) url's
google.com offers a variety of ways to discover new websites. You can learn about asp.net and .net framework, depending on your search.
According to the site this script corresponds with, it would return "google.com", "asp.net" and ".net" as a possible url, so apparently if a period has a letter after it, it's a url.
|