I have a string in java that might or might not contain some link (url like www.google.com, stackoverflow.com, stanford.edu, etc). Now I want to search in the string if it contains any link. I have two problems here:
What to search while searching for links. I mean link may or may not contain www, https, com, etc, so how to differentiate it from text. What is the RFC specifications for links?
Which function to use in Java for searching that regex? I am fairly new to Java.