On 10/2/05, Alex Fenton <alex / deleteme.pressure.to> wrote: [snip] > but there's no lookbehind in Ruby - I wonder if someone could suggest a neat > ruby alternative. with oniguruma this works: 'foo/bar // baz/qux'.split(/(?<!\/)\/(?!\/)/) # => ["foo", "bar // baz", "qux"] I am not sure exactly how you want it splitted. How about this one? 'a/b//c///d////e/////f'.split(/\/(?!\/)/) # => ["a", "b/", "c//", "d///", "e////", "f"] -- Simon Strandgaard