His method was failing for lack of
int. That
was the significant change. The negative lookahead assertion was rejecting the string when it reached the part of the string that had a decimal point. That caused the substitutions to stop before the string was done being commafied, and did nothing for eliminating the decimal portion.