The monoid of regular elements in commutative rings with zero divisors