On 7/27/07, Marcin Tyman <m.tyman / interia.pl> wrote: > Hi guys, > > I have string i.e: > a > b > c > c > c > a > c > d > > For example I would like to match all c lines with regexp. How can I > create the regexp if c lines can be ordered differently i.e: > a > c > b > c > c > a > d > > I will be appreciated for any help > > Thanks > -- > Posted via http://www.ruby-forum.com/. > > Marcin I have no idea what you want achieve? Do you have lines of strings or one string you have written into different lines? What is the output/result you want from the input? My first wild guess is that you should look at Enumerable#grep. R. -- [...] as simple as possible, but no simpler. -- Attributed to Albert Einstein