in reply to Re: Is there a regular expression version of the index function?
in thread Is there a regular expression version of the index function?

Thank you all for your help. I am now reading about the pos function.

Richard

  • Comment on Re^2: Is there a regular expression version of the index function?

Replies are listed 'Best First'.
Re^3: Is there a regular expression version of the index function?
by rzward (Monk) on Jun 21, 2004 at 10:21 UTC
    Oops. As you demonstrated in your example, $-[0] is what I'm looking for. According to perldoc:

    "...$-[0] is the offset into the string of the beginning of the entire match..."

    Thanks again.

    Richard