Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Regexp doubt

by kiruthika.bkite (Scribe)
on May 04, 2010 at 08:34 UTC ( #838266=note: print w/ replies, xml ) Need Help??


in reply to Regexp doubt

Is this you are expecting ?

$_='"ab"cde"fgh"'; s/("(.*?)")((.*?)")/$1 "$3 "/; print $_;


Comment on Re: Regexp doubt
Download Code
Re^2: Regexp doubt
by Anonymous Monk on May 04, 2010 at 09:43 UTC
    Thanks all for handy solutions.
    Improvised from Anomalous Monk's solution
    perl -e '$_= q["ab"cde"fgh"];print $1,"\t" while m/(?=("[^"]*"))/g'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (15)
As of 2015-07-01 17:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (14 votes), past polls