From: dblack@... Date: 2006-01-07T13:17:35+09:00 Subject: Re: Oniguruma lookbehind question Hi -- On Sat, 7 Jan 2006, K.Kosako wrote: > Is this pattern work for you? > > str = %Q{abc def "ghi jkl" mno} > re3 = /((?<=")[^"]+(?="))|([\S&&[^"]]+)/ > p str.scan(re3) #=> [[nil, "abc"], [nil, "def"], ["ghi jkl", nil], [nil, > "mno"]] Sorry -- I tested that accidentally with an old 1.9.0. Yes, with today's I do get the same as you. (And I also understand why it's choosing the right-hand alternate :-) See later posts in thread.) David -- David A. Black dblack@wobblini.net "Ruby for Rails", from Manning Publications, coming April 2006! http://www.manning.com/books/black