From: Paul Battley Date: 2006-08-03T03:28:13+09:00 Subject: Re: How to split(//) with respect to bigraphs? On 02/08/06, Justin Collins wrote: > irb(main):001:0> "czech".split(/([Cc][Hh])|/) > => ["c", "z", "e", "ch"] > irb(main):002:0> "check czech".split(/([Cc][Hh])|/) > => ["", "ch", "e", "c", "k", " ", "c", "z", "e", "ch"] > irb(main):003:0> "cHeck czeCh".split(/([Cc][Hh])|/) > => ["", "cH", "e", "c", "k", " ", "c", "z", "e", "Ch"] Or use scan: str.scan(/(?:ch)|./i) You might still have a problem with other characters, though, depending on the encoding and normalisation. Paul.