From: Gary Yngve Date: 2009-02-11T05:20:14+09:00 Subject: String#split "feature" --000e0cd228b829b3ae0462963b71 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Just got bitten by some functionality of split w/ grouped patterns: (in ruby 1.8.6...) >> "foo bar baz".split(/bar/) => ["foo ", " baz"] >> "foo bar baz".split(/(bar)/) => ["foo ", "bar", " baz"] The 1.8 docs are silent on this, but the 1.9 docs at least say "If pattern contains groups, the respective matches will be returned in the array as well. " This "feature" surprised the heck out of me.. Anyone know if this functionality is intentional (from the enduser standpoint), or rather a byproduct of implementation details? Anyhoo, if anyone else gets weird behavior for string split including the pattern, or with groups in the pattern, maybe you'll remember this or maybe google will tell you about this. Thanks, -Gary --000e0cd228b829b3ae0462963b71--