Retrieve all hashtags from a tweet in a PHP function
Posted
by snorpey
on Stack Overflow
See other posts from Stack Overflow
or by snorpey
Published on 2010-06-17T09:55:45Z
Indexed on
2010/06/17
10:13 UTC
Read the original article
Hit count: 184
Hi. I want to retrieve all hashtags from a tweet using a PHP function.
I know someone asked a similar question here, but there is no hint how exactly to implement this in PHP. Since I'm not very familiar with regular expressions, don't know how to write a function that returns an array of all hashtags in a tweet.
So how do I do this, using the following regular expression:
#\S*\w
© Stack Overflow or respective owner