Hi ..

Simon Strandgaard <neoneye / adslhome.dk> wrote:
> 
> How about something ala
> 
> irb(main):015:0> "aa;bbb\\;;abc;;d\\\\;e;".scan(/(?:\\[^.]|[^;])*;/)
> => ["aa;", "bbb\\;;", "abc;", ";", "d\\\\;", "e;"]
> 

Thanks!  That is close enough:

irb(main):019:0> s.scan(/(?:\\[^.]|[^;])*/).each do |it|
irb(main):020:1*   next if it.empty?
irb(main):021:1>   puts " --> #{it}"
irb(main):022:1> end
 --> a is a word
 --> b is too
 --> c\; for fun
 --> d -- forget it
=> ["a is a word", "", "b is too", "", "c\\; for fun", "", "d -- forget 
it", "", ""]



-- 
-mark.  (probertm @ acm dot org)