From: huseyin polat Date: 2006-03-03T08:46:00+09:00 Subject: Re: gsub problem Kent Sibilev wrote: > $ irb > irb(main):001:0> str="[1,2][2,1][3,1][4,1]," > => "[1,2][2,1][3,1][4,1]," > irb(main):002:0> str.gsub(/\]\[/, '],[').sub(/,$/, '') > => "[1,2],[2,1],[3,1],[4,1]" > > -- > Kent Kent ignore my first message please, yeah I have tried that but program still prints out as: [12][21][31][41] no commas :( -- Posted via http://www.ruby-forum.com/.