Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A regular expression for turning a word beginning with @ into a link to a Twitter profile.
$string = preg_replace(
'<a href="$1">@$1</a>',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.