in reply to New regex trick...

It's a new pseudo-anchor, \K, which tells the engine to pretend it just started matching.

What's the impact on pos() if you fake out the starting point? Does pos() still reflect the start of matching, or does it reflect the start of the last \K?

Replies are listed 'Best First'.
Re: Re: New regex trick...
by japhy (Canon) on Jul 22, 2002 at 20:12 UTC
    Present an example that explains your question. pos() refers to the end of the last global match. Are you asking about any interference between \K and \G? I do not foresee any.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      pos() refers to the end of the last global match.

      Oops, you're right. The code fragement I was thinking of used pos() - $delta to get the starting point.