var authors = document.getElementsByClassName("authors")[0]; authors.innerHTML = authors.innerHTML.replace(/([^, ]+)/g, "<a href='$&'>$&</a>");