I want to extract all the URLs in a string that's not between two certain characters. It should not extract the URL if it is between the following characters:
- " and "
- "> and <
I have the following string:
Content <strong>http://www.helloworld.com/test</strong> with a hyperlink <a href="www.google.com">www.google.com</a> and also a normal link www.youtube.com dsdsd sometexthttp://www.website.com/test sdfsdfsdfg ssdgsdf sdfsdfsdf
Regex what I currently have is:
(http://|https://|ftp://|mailto:|www\.){1}(?![^>]*<)(?![^"]*")[^^\\\"\n\s\}\{\|\`<>~]*
It will extract:
- www.youtube.com
- http://www.website.com/test
It should also extract, but it doens't right now:
It doesn't extract www.google.com (which is good)