in reply to Re: Evaluating code in a regex at runtime: (??{...})
in thread Evaluating code in a regex at runtime: (??{...})
> ... ('a' x 100) =~ /(?<match>(??{'(.)' x 100}))/;
ehm ... what you're showing also works with unnamed capture groups:
DB<113> ('a' x 10) =~ /((??{'(.)' x 10}))/; print "<$1>" => 1 <aaaaaaaaaa>
The OP's point was about dynamically generated capture groups, but yours is outside the embedded Perl code.
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Evaluating code in a regex at runtime: (??{...})
by Athanasius (Archbishop) on Jan 28, 2013 at 08:44 UTC | |
by LanX (Saint) on Jan 28, 2013 at 09:09 UTC |