Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# To parse a tweet from twitter to get teh '@' , '#' and the text seperated
parsed_text = tweet.text.gsub(/ ?(@\w+)| ?(#\w+)/) { |a| ((a.include?('#')) ? tags : replies) << a.strip.gsub(/#|@/,''); '' }
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.