Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Parsing "=" separated output

by Ratazong (Monsignor)
on Aug 03, 2011 at 07:14 UTC ( [id://918183]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    (?=\s[^\s]+=)
    
  2. or download this
    my $string  = "sometrash key1=value0 value1, value2 key2=value3 key3=v
    +alue4"; 
       $string .= " dummy=";              # add a dummy value for the rege
    +x to work
    ...
    while ($string =~ m/\s+([^\s]+?)=(.*?)(?=\s[^\s]+=)/g) 
        { $data{$1} = $2; }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-19 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found