in reply to Getting information about regexp matches

Not sure of this since I'm a little unclear how $regexp was generated. How ever, you may want to look into the function index.

Update: Hmm. index looks to be blank.

index STR, SUBSTR, OFFSET
This function searches for one string within another. It returns the position of the first occurance of SUBSTR in STR. The OFFSET, if specified, says how many characters from the start to skip before beginning to look.
Returns -1, if not found, positions based of off 0, and there's also rindex.

Most of that quoted from the Camel

  • Comment on Re: Getting information about regexp matches

Replies are listed 'Best First'.
Re: Re: Getting information about regexp matches
by ariels (Curate) on Apr 23, 2001 at 12:12 UTC
    Thanks, I already know about index.

    Unfortunately it is no good. It gives me the start position of a substring of my string (since I give the string, it doesn't have to give me its length). Which doesn't help for a regular expression.