My problem:
My users will write some text into <textarea> area. All I want to do with javascript is to take that textarea.value and replace all url links there with regular <a href> and then put whole text (with replaced urls) into another div.
Let's show it on example:
User will write sentence:
"This is my site http://www.try.org/see.html and I would like to replace it"
and I want my javascript to replace all urls this way:
"This is my site <A HREF="http://www.try.org/see.html">http://www.try.org/see.html</A> and I would like to raplce it"
Is it possible to make such a replacement with regular expression? (Yes, I can solve such a problem just by splitting string by words and test each word if it is not link) But I really want to know if it is doable by just .replace() function.
Thanks ...