Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: How to improve regex for parsing equals delimited data

by jwkrahn (Monsignor)
on May 11, 2012 at 18:03 UTC ( #970073=note: print w/ replies, xml ) Need Help??


in reply to How to improve regex for parsing equals delimited data

Another way to do it:

while ( <DATA> ) { $_ = reverse; my @fld; unshift @fld, scalar reverse $1 while s/(.+?)\s*=\s*\S+\s*//; print join( ',', @fld ), "\n"; }


Comment on Re: How to improve regex for parsing equals delimited data
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2015-07-07 21:38 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 (93 votes), past polls