Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Captured single quote results in captured phantom quote

by sn1987a (Deacon)
on Aug 25, 2016 at 12:32 UTC ( [id://1170418]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1170418]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-23 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found