i'm running out of ideas on the best regex implementation for this problem.
Sample user input:
bla bla bla http://foo.com bla bla bla http://tinypic.com/boo.png bla bla bla
Looking for solution that will detect non-image url and turn it into a link and also turn image url into an image embed (IMG tag).
so the output will be:
bla bla bla <a href="http://foo.com">http://foo.com</a> bla bla bla <img src="http://tinypic.com/boo.png" /> bla bla bla