stratkid has asked for the wisdom of the Perl Monks concerning the following question:
$i=10?#!/usr/bin/perl $_ = "lothlorien"; m/ (?{ $i = 0 }) (. (?{ $i++ }) )* lori /x;
Can someone enlighten me?
PS. The "code sub-pattern" is zero-width; is this why it can sit in a pair of paratheses that is being quanified (by the *). This seems very weird to me.
~stratkid
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: code within a regular expression
by samtregar (Abbot) on May 02, 2002 at 04:11 UTC | |
by stratkid (Initiate) on May 02, 2002 at 04:50 UTC | |
|
(crazyinsomniac) Re: code within a regular expression
by crazyinsomniac (Prior) on May 02, 2002 at 03:04 UTC |