I got this code for "automatic" links
but if you write a "-" or a "~" the link
stops there, can anyone help me fix this?
<script language="javascript1.2" runat=server>
function edit_hrefs(s_html){
// use regular expressions to look for
// e_mail addresses and urls
s_str = new String(s_html);
s_str = s_str.replace(/\bhttp\:\/\/www(\.[\w+\.\:\/\_]+)/gi,
"http\:\/\/¬¤¸$1");
s_str = s_str.replace(/\b(http\:\/\/\w+\.[\w+\.\:\/\_]+)/gi,
"<a href=\"$1\">$1<\/a>");
s_str = s_str.replace(/\b(www\.[\w+\.\:\/\_]+)/gi,
"<a href=\"http://$1\">$1</a>");
s_str = s_str.replace(/\bhttp\:\/\/¬¤¸(\.[\w+\.\:\/\_]+)/gi,
"<a href=\"http\:\/\/www$1\">http\:\/\/www$1</a>");
s_str = s_str.replace(/\b(\w+@[\w+\.?]*)/gi,
"<a href=\"mailto\:$1\">$1</a>");
return s_str;
}
</script>
[url=http://www.data-doktorn.nu]-=Data-Doktorn=-[/url]
Snart på en dator nära dig!