in reply to Re^3: Style question: regex versus string builtin function
in thread Style question: regex versus string builtin function

Well, dang!

I'd recommended using index because of (inter alia) some gnarly behavior with empty patterns. But it turns out it was even more gnarly than I thought.

BTW, perlreref says

If 'pattern' is an empty string, the last I matched regex is used.
What is the 'I' in 'I matched'? I couldn't find it mentioned again in perlre or perlreref, and searching on 'I' turned out to be ... overproductive.

throop

  • Comment on Re^4: Style question: regex versus string builtin function

Replies are listed 'Best First'.
Re^5: Style question: regex versus string builtin function
by kyle (Abbot) on Oct 02, 2007 at 15:41 UTC

    A bug in perlreref? On my screen, I see:

    If ’pattern’ is an empty string, the last I<successfully> matched

    I know too little about POD to say whether this is a problem with the web rendering or a problem with how the file is written.