Skip to content

Instantly share code, notes, and snippets.

@bensonk
Created July 21, 2012 05:21
Show Gist options
  • Save bensonk/3154692 to your computer and use it in GitHub Desktop.
Save bensonk/3154692 to your computer and use it in GitHub Desktop.
A python function to find hashtags in a given tweet
def get_hashtags(tweet):
words = tweet.split()
[ x if x.startswith('#') ]
@LoneFry
Copy link

LoneFry commented Jul 21, 2012

import re
words = re.findall('#\w+', tweet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment