/** * PHP Regex to Make Twitter Links Clickable */ public static function twitterParse($data) { $return = OFunction::urlParse($data); $return = preg_replace('#@([\\d\\w]+)#', '<a off_address="" href="https://twitter.com/$1" rel="nofollow" target="_blank">$0</a>', $return); $return = preg_replace('/#([\\d\\w]+)/', '<a off_address="" href="https://twitter.com/hashtag/$1?src=hash" rel="nofollow" target="_blank">$0</a>', $return); return $return; }