in reply to Re: What does it mean that a "pattern cannot be reversed?"
in thread What does it mean that a "pattern cannot be reversed?"

I think it should keep .*? as .*? on the theory that the actual underlying abstraction is "longest/shortest", not "earliest/latest".

I think code assertions can still work unless they make assumptions like "$1 is always bound before $2". (And I don't think we should reverse $1 and $2 for them. Reversing a lexical scope would be evil.)

But basically, I don't know what the limits are yet. All I know is that Perl 5 sets them too tight, and we can push them out a little. Rule matching can be more powerful than a locomotive, but there will always be a bit of kryptonite in the world. Language designers tend to concentrate on the locomotive rather than the kryptonite.

Replies are listed 'Best First'.
Re^3: What does it mean that a "pattern cannot be reversed?"
by tphyahoo (Vicar) on Apr 27, 2005 at 14:47 UTC
    FWIW, relevant reading to this issue at sexeger.

    SNIP:

    "If we're able to look at the specific nodes of a regular expression, then we should be able to create a regex that works from the BACK of a string to the FRONT. What do I mean?

    ....."