in reply to Re: initializing internal regex variables?
in thread initializing internal regex variables?

Okay, maybe I'm reading more into your response than I should, but here are two questions:

Replies are listed 'Best First'.
Re^3: initializing internal regex variables?
by JavaFan (Canon) on Nov 17, 2009 at 21:06 UTC
    is not the regular expression originally quoted non-greedy?
    It is. But what do you expect non-greedy to be? Some people think that non-greedy means "match an as short string as possible", without anything else. But there is just one such a string, and that's the empty string.

    Non-greedy does not mean, "don't match where you would match otherwise". If a pattern matches with greedy (sub) matches, it will match with non-greedy sub matches. And if a pattern doesn't match with non-greedy sub matches, it will not match with greedy sub matches.

    All greedy/non-greedy will do is change $&, it will not change whether or not a pattern matches.