When I run this program with input (A((BC)D)(EF)), i get the following output, which I don't understand. Can some explain this regular expression$tree = <>; chop($tree); while ($tree=~s/\(?([A-Z])([A-Z])\)?/\1/) { print $tree; print "\n"; }
(A(BD)(EF)) (AB(EF)) A(EF)) AE) A
In reply to Interpretation of my output by musa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |