Created
May 19, 2014 20:01
-
-
Save jserrao/2eb57a02095e7a560c8f to your computer and use it in GitHub Desktop.
Finding a twitter handle in a tweet, via http://stackoverflow.com/questions/11852890/identifying-twitter-handle-in-a-plain-text-sentence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('div').html( | |
function(i,html) { | |
return html.replace(/(@\w+)/g, '<span>$&</span>'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment