$_="{".<>."}"; do{$m=$n=1;do{$m<$n?$m=$n:$n++ }while/([^{}]{$n})([^{}]{$m})/; $m<$n?$n--:$m--} while s/([^{}]{$n})([^{}]{$m})/{$1}{$2}/; print
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page