in reply to Re^2: Optimization of Regexes
in thread Optimization of Regexes

but clearly a difference between the versions

Specifically, a difference in the program into which the regex is compiled. As you mentioned, the difference is that the latter is more efficient to execute. It's slower to compile, though.

Don't suppose the optimized regex gets stored anywhere accessible?

What? What is it you want?

Replies are listed 'Best First'.
Re^4: Optimization of Regexes
by shadowSage (Novice) on Sep 22, 2014 at 14:24 UTC
    And the difference is that the latter is more efficient to execute, though it's slower to compile

    Yep, I read you loud and clear there. I gather there is some way to override the default (if for some reason I did want to use the pre 5.10 way)? Just idle curiosity.

    What? What is it you want?

    Was just wondering if there was a way to get the optimized regex in a scalar without Regexp::Assemble, like maybe it gets stored in some var somewhere.

    No big deal if it doesn't, I am just playing/experimenting/learning at the moment.

      No way to override how the regex gets compiled.

      Are you operating on the mistaken belief that the pattern gets transformed before being compiled? The only transformation that happens is the compilation of the pattern, and I've already showed you how to see what that results in.