From: Jason Date: 2007-04-21T05:10:06+09:00 Subject: Re: splitting a string into words using multiple possible separators string.split(/[^a-zA-Z0-9\-]/) Robert Klemme wrote: > 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