Fix regex with 0 coefficent and hints with negative denominator