Is there javascript that makes every text link eg:
Into a proper link. Thanks.
| Code: |
| www.youtube.com |
Into a proper link. Thanks.
| Code: |
| www.youtube.com |
| Code: |
| (?<=[^\"])(http://)?.+?\.[^s]+?\.(com|net|org|biz|co\.uk)(/.+?)?(?=[^\"]) |
| Code: |
|
myregex=/(?<=[^\"])(http://)?.+?\.[^s]+?\.(com|net|org|biz|co\.uk)(/.+?)?(?=[^\"])/ function rep(e){ if (e.substr(0,7)!="http://"){ url="http://"+e } else{url=e;} return "<a href='"+url+"'>"+e+"</a>" } document.body.innerHTML=document.body.innerHTML.replace(myregex,rep) |