I want to match twitter usernames and replace it with a string. This is with PHP
This is the regex I have
/(^|[^a-z0-9_])[@@]([a-z0-9_]{1,20})([@@\xC0-\xD6\xD8-\xF6\xF8-\xFF]?)/iu
I have a string like
RT @omglol I am hungry @lolomg bla
I want to replace every username there with a html tag like
<a href="http://lol.com">@omglol</a>
How can I do this? Thaks for answers