in reply to Re: Bizarreness in ?PATTERN? and g
in thread Bizarreness in ?PATTERN? and g

Well yeah, because the ??'s only return true. But surely when you repeat the code, it should be a completely seperate regex. Why should it's match be determined by the first regex?

Replies are listed 'Best First'.
Re^3: Bizarreness in ?PATTERN? and g
by BrowserUk (Patriarch) on Jun 04, 2004 at 05:06 UTC

    Because pos( $_ ) isn't being reset. Sort of like you had used /gc. I'm not sure if that constitutes a bug or not?


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
      Depends how you read
      except that it matches only once between calls to the reset() operator
      Does "matches" mean attempts to match only once (i.e. pos is completely unaffected when it no longer even try to match) or that later attempts to match will automatically fail (and pos is reset unless //c).

      Obviously the actual implementation agrees with the former interpretation. And my take is that it seems better that way.