# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/(?<=^|\s)(?:(\w*')?)(@(\S+))/<a href="\/user\/$3">$2<\/a>/gm;t' <<< "1. take this -> @Mark
2. take this -> @mark_2
3. take this -> @中国
4. take this -> l'@antro
5. don't take this -> 中国@中国.zh
6. don't take this -> 中国@google.zh
7. don't take this -> info@google.com
8. don't take this -> 99@test.com
9. don't take this -> 99@user
10. don't take this -> %&@user
11. take this -> dell'@altro
12. take this -> l'@mike"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html