Ruby RegExp Example
a = ["[email protected]", "world"]
search = "[email protected]"
search.gsub!(/\.\.\./, ".*")
i = a.index { |a| a =~ /#{search}/}
puts a[i]
INFO
a = ["[email protected]", "world"]
search = "[email protected]"
search.gsub!(/\.\.\./, ".*")
i = a.index { |a| a =~ /#{search}/}
puts a[i]