I think you misunderstood what Joe was saying. The RFC document he pointed you to describes in detail what a valid URL looks like. With that knowledge you can write code (possibly using regular expressions and other string operations) that checks whether a piece of text is (or contains) a valid URL.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com