I can't reproduce your output, but are you looking for something more like:
while (/A(BC)?D/g) { push @matches, $1 if $1; }
In reply to Re: how to make // not return what is in a parenthesis?
by chromatic
in thread how to make // not return what is in a parenthesis?
by beanryu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |