in reply to regular expression help
Or the more flexible:my %data = map split(/=/, $_, 2), grep /^[abc]=/, split ' '; print "$_ is $data{$_}\n" for keys %data;
my %data = /([^=\s]+)=(\S*)/g; print "$_ is $data{$_}\n" for grep /^[abc]\z/, keys %data;
Update: Added alternative.
|
|---|