Possible Duplicate:
Regex to match URL
Given a String, I want to know whether it represents a URL or not and get the website name, which is the "whatever". For example, given "http://google.com.sg" or "http://google.com.sg/", I want to return String "google.com.sg".
Is there a neat way of doing this in Java?