Reputation:
So here is what I got so far:
(?<=\s|\b)https?://[^ ]+(?<!jpe?g|png|bmp|gif)(?=\s|\b)
Problem is, it's matching this:
http://imgur.com/test/img.jpg
(Up to the img). I want it to return no matches.
So basically, these should match:
http://test.com/index.html
https://anything.net/this
check out this link: https://anything.net/this it's really cool
And these shouldn't match:
http://imgur.com/ixmas.jpg
http://example.com/testdirectory/rawr-gif.gif
testhttp://example.com/rawr
Upvotes: 0
Views: 2161