Created
November 24, 2015 19:51
-
-
Save johnivanoff/39303fe7eed34d91c7e7 to your computer and use it in GitHub Desktop.
find words that start with @
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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