in reply to Re: g matching after a single regular match
in thread g matching after a single regular match

You could also do the slightly simpler (and slightly more permissive):
/([\d.]+|A+|B+)/g;

Caution: Contents may have been coded under pressure.