From: MonkeeSage Date: 2007-11-26T14:20:10+09:00 Subject: Re: specify start postion of Regexp matching What's the difference between 1.9 Regexp#match(string, start=n) and 1.8 Regexp#match(string[n..-1])?? You have to create a sub-string with the 1.8 version, but according to Robert Klemme (above) it's just creating a pointer into the original string if you're not changing the substring or original string. Besides, even if you did get a copy, it's anonymous and should be garbage collected soon. If I understand everything correctly, the 1.9 version would just basically be a convenience feature over the 1.8 way? $ irb19 irb(main):001:0> RUBY_VERSION => "1.9.0" irb(main):002:0> m = /oo/.match("foo", start=1) => # irb(main):003:0> m[0] => "oo" $ irb irb(main):001:0> RUBY_VERSION => "1.8.6" irb(main):002:0> m = /oo/.match("foo"[1..-1]) => # irb(main):003:0> m[0] => "oo" Regards, Jordan