Jacob Tomlinson 1/22/2014

Convert tweet hashtags, at-tags and urls to links with PHP and Regular Expressions

Read Original

This technical tutorial demonstrates how to use PHP's preg_replace() function with regular expressions to parse a tweet string and automatically convert URLs, hashtags, and @mentions into their corresponding HTML anchor tags, linking to external sites, Twitter searches, and profiles.

Convert tweet hashtags, at-tags and urls to links with PHP and Regular Expressions

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week