James Edward Gray II wrote:
> On Feb 11, 2005, at 12:04 PM, Jim Van Fleet wrote:
>  
> 
> Here's a direct Ruby translation:
> 
> def commify( number )
>     text = number.to_s.reverse
>     text.gsub!(/(\d\d\d)(?=\d)(?!\d*\.)/, '\1,')
>     text.reverse
> end
> 
> Hope that helps.

It sure did, and cut my LOC count in half.

What does \1 signify, exactly?  Is this the active matched section of 
the source string at the time?

Cheers,

Jim