diff --git a/parser.rb b/parser.rb index adaad3e..5e70a1f 100644 --- a/parser.rb +++ b/parser.rb @@ -1,3 +1,5 @@ def word_in_string?(word, string) - # implement with your code here + val = /#{word}\W|\W#{word}|\_#{word}|#{word}\_/.match(string) + return :yes if val != nil + :no end