Fixed regex bug for attribute analysis