diff --git a/parser.rb b/parser.rb index adaad3e..1fa7bd5 100644 --- a/parser.rb +++ b/parser.rb @@ -1,3 +1,4 @@ def word_in_string?(word, string) # implement with your code here + string.match( /(?:\b|_)#{word}(?:\b|_)/ ) ? :yes : :no end