On 02/08/06, Justin Collins <collinsj / seattleu.edu> 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.