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