Skip to content

Instantly share code, notes, and snippets.

@johnivanoff
Created November 24, 2015 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnivanoff/39303fe7eed34d91c7e7 to your computer and use it in GitHub Desktop.
Save johnivanoff/39303fe7eed34d91c7e7 to your computer and use it in GitHub Desktop.
find words that start with @
# find words that start with @
def find_project(str)
p str.scan(/\B@(\w+)/i)
end
find_project('this is @cpord ford.')
find_project('this is hi@cpord ford.')
find_project('@cpord ford.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment