I'm trying not to capture anchor tags, so i used this
(?!([^\<]+)<\/a>)(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])
which excludes the anchor tag and selects the urls which are not present inside anchor tags but it fails for this case:
<a href="www.google.com"> <b> Google Homepage </b> </a>
because of the left angular brace.
so I thought of using this
(?!(<a.+)<\/a>)(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])
but this isn't working ?
Anybody please explain why this is not working and what can be the possible solution to my problem.
Hope I explained the question, thanks in advance for helping.