my $quote = qr/"[^"]*"/; # Naive s{\G((?>.*?(?:$quote|(?=(\(\{|\}\)))))*?)\2} {$1 . ($2 eq '(\{' ? '[' : ']')}eg;
You didn't have it in your pattern, and my pattern is based on your, but you should replace "})" with "]," if it shall become a list.
ihbIn reply to Re: Re: Parsing Text into Arrays..
by ihb
in thread Parsing Text into Arrays..
by castaway
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |