Keep in mind that $#+ is -1 when the pattern does not match, regardless of whether there are captures.
Good point. I was just thinking of my context where I'm guaranteed a successful match.
In reply to Re^4: Determing whether a regexp has capturing matches
by adrianh
in thread Determing whether a regexp has capturing matches
by adrianh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |