On Sep 22, 12:58=A0pm, Cheyne Li <happy.go.lucky.... / gmail.com> 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=3Daabbcc<p>ccddee</p>
>
> I wanna get the anything between <p> and </p>, 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{</?p>})[1]