pick out the first person in the data called Laura:
require 'csv'
people = CSV.read('text.txt')
laura = people.find { |person| person[0] =~ /Laura/ }
puts laura.inspect
//File: text.txt
F,M,M,45
L,C,F,23
D,P,F,38
Related examples in the same category