From: 7stud -- Date: 2007-11-01T14:58:48+09:00 Subject: Re: String#split and groups in the field separator RE mortee wrote: > Is this expected behaviour? I haven't seen anything related to this > mentioned in the API docs... $ri String#split ... ... if _pattern_ is a +Regexp+, _str_ is divided where the pattern matches. Whenever the pattern matches a zero-length string, _str_ is split into individual characters. ... pickaxe2, p. 619 adds a line to the end of that description: ... If pattern includes groups, these groups will be included in the returned values. -- Posted via http://www.ruby-forum.com/.