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