($re=$_)=~s/((\Q$q1\E)|(\Q$q2\E)|.)/${['(','']}[!$2]\Q$1\E${[')','']}[ +!$3]/gs; @$ = (eval{/$re/},$@); print join"\n",@$ unless $$[-1]=~/unmatched/;
In reply to Re: parse nested text
by I0
in thread parse nested text
by adoupas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |