Thanks!

It seems that you've given wrong link as i've unable to find anything
regarding "regular expressions" in that pdf.

Jarmo

On Feb 1, 5:34=A0am, Josh Cheek <josh.ch... / gmail.com> wrote:
> On Mon, Jan 31, 2011 at 5:05 PM, Jarmo Pertman <jarm... / gmail.com> wrote:
> > Hi!
>
> > I was just wondering if there is possible to write recursive regular
> > expressions in Ruby? As i'm understanding at this moment then there
> > isn't. Prove me wrong.
>
> > If you're not aware of such possibility in Perl for example then here
> > is one good blog post about it
> >http://www.catonmat.net/blog/recursive-regular-expressions
>
> > It seems that also PHP has such a functionality.
>
> > Jarmo
>
> 1.9.2 has it, here is an example:
>
> regex =3D /^(?<bracketed>\[(\g<bracketed>|\d)\])$/
> =A0 =A0 =A0 =A0'1'.match regex # =3D> nil
> =A0 =A0 =A0'[1]'.match regex # =3D> #<MatchData "[1]" bracketed:"[1]">
> =A0 =A0'[[1]]'.match regex # =3D> #<MatchData "[[1]]" bracketed:"[[1]]">
> =A0'[[[1]]]'.match regex # =3D> #<MatchData "[[[1]]]" bracketed:"[[[1]]]"=
>
>
> I found it in the Christmas edition of PragPub (http://pragprog.com/magaz=
ines/download/19.PDF) they talk about it more in
> depth, as well, if you want more info.