in reply to Re: Problem adding comma & removing decimal
in thread Problem adding comma & removing decimal

I don't see any significant difference with the code he was using (apart from the int).

To the OP: I think that if it fails, it's probably to blame to the format of the "numberstring" you're passing to this sub.

  • Comment on Re^2: Problem adding comma & removing decimal

Replies are listed 'Best First'.
Re^3: Problem adding comma & removing decimal
by davido (Cardinal) on Jun 05, 2004 at 07:08 UTC
    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.


    Dave