could you please someone tell me how to match these types of url in string?
For example:
example.com
www.example.com
http://example.com
https://www.example.com
example.com/exam1/exam.php
example.com/exam
...
Actually, I need to detect all forms of URL you can see for example on Twitter in plain text.
I have tried to find some regex by google but I couldn't find something which fits all the types in Java.
UPDATE: Maybe I wasn't too precise - I need find all these types of url in plain text and replace them by some token. For example: status.replaceAll(yourRegex, "URL");
Thank you!