paren matching by nfouille

#!perl -p
%h=qw/[ ] ( ) { }/;s/([[{(])|\?/$1?$1.""x push@s,$h{$1}:pop@s/ge

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page