I have the following issue.
phrase = "I love Chrome and firefox, but I don't like ie."
browsers = ["chrome", "firefox", "ie", "opera"]
def little_parser ( str )
# what's the best way to retrieve all the browsers within phrase?
end
If we use the method little_parser( phrase ), it should return
["chrome", "firefox", "ie"]
If the phrase was:
phrase_2 = "I don't use Opera"
If we run little_parser( phrase_2 ), it should return only:
["opera"]
How do I do that in the simplest way?