I have an array of 10 items containing of a several lines string like
one string
two string
some string
any string
I want to delete lines containing words some and two. I made code like that:
search_text_domain = %r{some|two}
groups_data.each do |line|
line.each_line do |num|
domain_users_name << (num) unless num =~ search_text_domain
end
end
It works fine but it puts all lines to one big array like
domain_users_name = ["one string", "any string", "big string", "another_s....] and I want tu put it in array of arrays like
domain_users_name = [["one string", "any string"], ["big string", ""another_s...."], [........
I need version that permanently modify groups_data array. Any ideas?