Result
jQuery
$("#autlink").each(function(){ //http、httpsなどで始まる文字列を正規表現でリンクに置換する $(this).html( $(this).html().replace(/((http|https|ftp):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/g, '<a href="$1">$1</a> ') ); });
html
<p id="autlink">かちびと.netのアドレスは http://kachibito.net/ です</p>