You'e solution is the one I came up with...almost.
My regex was /(\w+} = (.+)$/ where I chose not to include the end-of-line in the second capturing expression.
Generally I prefer the regex approach to the split() approach because of the possibility that there might be extraneous info prior to the word to be used as the key.
But of course, if anything (and everything) before the = sign is to be used as the 'key' then either the split() or an adjusted regex /^(,+) = (.+)$/ would work fine for me. But then I'm not sure how the OP would only capture, in the hash, those keys that he's interested in (which seem to be simple words). Of course, I guess that would'nt be a problem if the only thing before the ='s was always just a single-word key.
In reply to Re^2: Determining the regex for foo=bar
by ack
in thread Determining the regex for foo=bar
by japhmi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |