If you don't want to use regexps, at least use String#split on .