From: pit@... Date: 2001-07-13T17:41:24+09:00 Subject: [ruby-talk:17777] Regex Groups in String#split (Re: Array#sort! returns nil when array empty) > pigeon% ruby -e 'p ("a b c :d e f".split(/:(\S.*)|\s+/) - [""])' > ["a", "b", "c", "d e f"] pigeon% I've never seen this feature documented anywhere. Very tricky! You can even get rid of the dubious ' - [""]' by changing the code to "a b c :d e f".split(/\s+:(\S.*)|\s+/) Pit