http://www.perlmonks.org?node_id=1170418


in reply to Captured single quote results in captured phantom quote

The observed behavior is correct. The named captures do not prevent the contents from saved to the numbered capture variables. So in your first three regexs, element 1 gets the entire quoted string and element 2 gets the first quote.

  • Comment on Re: Captured single quote results in captured phantom quote

Replies are listed 'Best First'.
Re^2: Captured single quote results in captured phantom quote
by Ach (Initiate) on Aug 25, 2016 at 13:43 UTC

    Oh yeah, that's right. Named capture groups doesn't affect the array of captured groups.

    Thanks