Say I have the following array of addresses
array = ["1 New Street, Filton Grove, Bristol BD7 0AA", "2 New Street, Filton Grove, Bristol BD7 0AA", "3 New Street, Filton Grove, Bristol BD7 0AA"]
I would like to check that each item in the array contains the words Filton Grove Bristol, but as there are commas within the address is is throwing me slightly.
How do I ignore the commas and check that each word exists in each iteration of the array
So far I have this
regexp = /^Filton Grove Bristol/i
array.all? { |a| regex =~ a }
But this fails.