Skip to content

Instantly share code, notes, and snippets.

@jasonyost
Created June 30, 2014 12:21
Show Gist options
  • Save jasonyost/9db291478434b7f922f6 to your computer and use it in GitHub Desktop.
Save jasonyost/9db291478434b7f922f6 to your computer and use it in GitHub Desktop.
Ruby Regex to capture hashtags from a string
/(?:\s|^)(?:#(?!(?:\d+|\w+?_|_\w+?)(?:\s|$)))(\w+)(?=\s|$)/i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment