I want to list out all of the strings in an array that include a given keyword.
array_name = ["this is california", "hawaii", "washington", "welcome to california"]
a = array_name.map { |s| s.scan(/\b(california)\b/i) }.flatten
# => ["california", "california"]
The above will create a new array of strings where each string is "california". How do I make a new array with the entire original string?