From: suroot57@... Date: 2008-09-25T09:24:48+09:00 Subject: Re: how to extract something in between a pattern On Sep 22, 12:58 pm, Cheyne Li wrote: > Hi experts, > > I'm not very familiar with ruby's library. I wonder if there a method > can extract something in a pattern? For example, > > I have a string: a=aabbcc

ccddee

> > I wanna get the anything between

and

, which is ccddee > > Thanks in advance. > -- > Posted viahttp://www.ruby-forum.com/. If you want to use regexp, a quick and dirty way would be : (a.split %r{})[1]