From: Robert Klemme Date: 2007-04-21T00:30:05+09:00 Subject: Re: splitting a string into words using multiple possible separators On 20.04.2007 17:05, Doan, Alex wrote: > Perhap: >>> string = 'my uncle, jumped over; > > the moon' > > a = string.scan(/\b\w+/) > ["my", "uncle", "jumped", "over", "the", "moon"] Or irb(main):001:0> string = 'my uncle, jumped over; the moon' => "my uncle, jumped over; the moon" irb(main):002:0> string.scan /\w+/ => ["my", "uncle", "jumped", "over", "the", "moon"] irb(main):003:0> string.split /\W+/ => ["my", "uncle", "jumped", "over", "the", "moon"] Kind regards robert