From: calvin8@... (Andi Scharfstein) Date: 2003-06-11T01:30:48+09:00 Subject: Re: OT: Regexp question Hi, > When matching what you want is hard, try matching what you don't want: irb(main):001:0>> a = [ "Illinois (3762)", "Indiana", "Iowa (64)", "Kansas", "Kentucky (2675)", "New York (2348)" ] =>> ["Illinois (3762)", "Indiana", "Iowa (64)", "Kansas", "Kentucky (2675)", "New York (2348)"] irb(main):002:0>> a.each { |state| s = state.sub(/ \(\d+\)$/, ""); p s } I like that one :) -- Bye: Andi S. mailto:nullpointer@myrealbox.com