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; }