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のアドレスは / です</p>
via
[myphp file=’jquery-other-snippets’]
