I want find special character like @ from the string and wrap it to html tag like span or div, like
var str = "@user you email id is some@gmail.com"
.
So i want @user to be <span class="class">@user</span>
, but the email should not be effected as it also have @
,
I am new to regex, but came up with an regex but it doesn't work /\@[\w]+/g
but this also selects the @gmail from the email, which is incorrect, Please help