さくです。

At Sun, 26 Nov 2000 23:05:08 +0900,
nobu.nakada / nifty.ne.jp wrote:

> class String
>   def comma_split
>     scan(/((?:[^\\,]|\\.)+)(?:,(?!\z))?|,/).flatten
>   end
> end

む、\zかぁ……。失念してましたね。

> p ",,aaa,,bbb,ccc,dd\\,d,eee".comma_split
> # => [nil, nil, "aaa", nil, "bbb", "ccc", "dd\\,d", "eee", nil]

これは、

p ",,aaa,,bbb,ccc,dd\\,d,eee,".comma_split
# => [nil, nil, "aaa", nil, "bbb", "ccc", "dd\\,d", "eee", nil]

のほうですね。

-- 
OZAWA -Crouton- Sakuro
E-Mail: crouton / weatherlight.org
   Web: http://www.weatherlight.org/~crouton/
   PGP: C98F 74E0 AEEB 4578 1DFC  F650 3BE0 9627 11FC C9F5
VERBA VOLANT, SCRIPTA MANENT