in reply to Re^5: Efficient regex matching with qr//; Can I do better?
in thread Efficient regex matching with qr//; Can I do better?

"It only needs named captures if you want to know which one of the regexes matched."

Sorry if I'm slow, but can't I just as well find that out with the $+ operator as in my previous post? Or is that less efficient than using these named captures?
  • Comment on Re^6: Efficient regex matching with qr//; Can I do better?

Replies are listed 'Best First'.
Re^7: Efficient regex matching with qr//; Can I do better?
by moritz (Cardinal) on Jul 14, 2008 at 20:35 UTC
    No, I'm being slow. In the general case it doesn't work (because you can't infer from the matched text what the pattern looks like), but in your case you can. I forgot how your string look like when I wrote my reply. Sorry for the confusion.
      No problem at all. Thanks a lot for your answers.