JSFiddle - React, Tailwind, and code Playground
HTML
<p id="test">@user has an email address of user@email.com. See! the regexp works @people!</p>
JavaScript
test.innerHTML = test.innerHTML.replace(/\B\@([\w\-]+)/gim, function(match, name){
return '<a href="http://twitter.com/users/' + name + '">' + match + '</a>';
})