Hi Brian thanks for your answer. as I stated to David, I just know about the surrounding brackets not the bits between them. Fritzek On 18 Sep., 17:08, Brian Candler <b.cand... / pobox.com> wrote: > > b = a.gsub(/\[b\]/,' ') > > Also possibly useful is for you: > > a = "aaa[b]bbb[b]ccc" > bits = a.split(/\[b\]/) > > -- > Posted viahttp://www.ruby-forum.com/.