Dan Diebolt
12/18/2008 11:32:00 AM
I am having a difficult time understanding what you are asking, but perhaps=
this will help:
lines =3D <<EOF
100|data B|data C|data D|data E:Name:bob
200|data B|data C|data D|data E:Name:sue
200|data B|data C|data D|data E:Name:tim
200|data B|data C|data D|data E:Name:tim
EOF
names=3DHash.new(0)
lines.each do |line|
=A0 a,b,c,d,e=3Dline.chomp.split("|")
=A0 names[e[/Name:([a-z]+)/,1]] +=3D 1 if a=3D=3D"200"
end
names
=3D> {"tim"=3D>2, "sue"=3D>1}