Your elegant solution won't match the edge case of aa, but it's unclear to me whether that is relevant for the OP.
In reply to Re^2: Must do regex range quantifier { } as a greedy
by Corion
in thread Must do regex range quantifier { } as a greedy
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |