Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Nested grouping or capturing inside capturing

by eddor1614 (Beadle)
on Nov 22, 2011 at 20:01 UTC ( #939532=note: print w/ replies, xml ) Need Help??


in reply to Re: Nested grouping or capturing inside capturing
in thread Nested grouping or capturing inside capturing

That was exactly what I did a few months ago. And today I spend a few minutes trying to find out why I put s/"//g:

foreach (<DATA>) { ($a,$b,$c) = ($3,$2,$1) if /^(\w+)\s(\S+)\s("([^"]+)"|(\w+))/; $a =~ s/"//g; . .

I thought that if I need to match 3 fields, there should by a regexp that sets $1, $2 and $3. Just as a mental exercise. Thanks for your answer.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2016-06-26 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (331 votes). Check out past polls.