develooper Front page | perl.perl5.porters | Postings from September 2011

Re: Regex warning

Thread Previous
David Nicol
September 22, 2011 07:24
Re: Regex warning
Message ID:
On Thu, Sep 22, 2011 at 5:30 AM, Tom Christiansen <> wrote:
> but how best to inline it inside a (?....) is less than perfectly clear.
> At least to me.
> --tom

The first thing is to get interpolation of regexes within regexes to
be tree splices instead of translations to source and then
recompilation. Once that's in place, a symbol can have multiple local
meanings in different parts of the same regex, using the existing
syntax for "run this bit of source and interpolate the result at
string assembly time."  Which is,

   ${\do{ use re boundary => "fancy words"; qr/\b/ }}

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About