You already got some good alternative snippets that fix these errors, but I thought it would be helpful to point them out explicitly. Namely, your regexp will give the wrong results when what immediately follows the = matches \s. Therefore you should replace the .*? in the captures with .+?. Also, you should add the /s modifier to the regexp if you want the . in the captures to match \n.
the lowliest monk
In reply to Re: Reading into a hash from regex
by tlm
in thread Reading into a hash from regex
by songahji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |