hello
you can do as below,
include jQuery javascript file
<script src="jquery.js" type="text/javascript"></script>
your html code should be as below
<p></p><p class="findLink">www.google.com</p>
<p>Page contents is here </p><p class="findLink">http://somelink.com</p>
and your replace javascript code should be as below
function UpdateLink()
{
$(".findLink").each(function(i,e){
debugger;
$(e).prev().append("<a href="\""">" + $(e).html() + "</a>");
$(e).html('');
});
}
UpdateLink();