From: nobu.nokada@... Date: 2002-12-08T00:59:13+09:00 Subject: Re: regexp: zero-width match for PRECEDING atom Hi, At Sun, 8 Dec 2002 00:43:06 +0900, Emmanuel Touzery wrote: > I'm looking for the pattern which is (? for ruby, but it seems not to exist (while some other (?:), (?=) (?!) > sequences do exist). Currently, lookbehind is not implemented. Oniguruma RE engine has it and will be used in future. > Any alternatives? Does it actually exist? > > What i would like to do: split this string: > "/home/emmanuel / /home/emmanuel/my\\ dir\\ with\\ spaces" > > so that I get: > ["/home/emmanuel", "/", "/home/emmanuel/my\\ dir\\ with\\ spaces"] string.scan(/(?:\\ |[^ ])+/) -- Nobu Nakada