From: Simon Strandgaard Date: 2004-04-22T23:01:32+09:00 Subject: Re: [ann] regexp-engine-0.8, perl5 + some perl6 ts wrote: > >>>>> "S" == Simon Strandgaard writes: > > S> The engine are going to support inline code inside regexp. > S> Is this a feature you would use? > > Don't forget this > > "(?{ code })" > > [...] > > For reasons of security, this construct is forbidden if the > regular expression involves run-time interpolation of vari- > ables, unless the perilous "use re 'eval'" pragma has been > used (see re), or the variables contain results of "qr//" > operator (see "qr/STRING/imosx" in perlop). > [...] > > and there are not really parano, on p5p > Yes security is an issue here. I think that one must supply a option when they wish inline code to be executed. Or perhaps rely on $SAFE-level ? code = "remember position; puts 'hello world'" re = NewRegexp.new("xy(?{#{code}}).{42}z", INLINE_CODE) -- Simon Strandgaard