Note that the contents of the match are still accessible via a named capture group:
#! perl use Modern::Perl; ('a' x 100) =~ /(?<match>(??{'(.)' x 100}))/; say $+{match};
Output:
12:28 >perl 504_SoPW.pl aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 12:28 >
See Capture groups.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Evaluating code in a regex at runtime: (??{...})
by Athanasius
in thread Evaluating code in a regex at runtime: (??{...})
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |