in reply to Comma-fy floats with (+/-)look(aheads/behinds)

It isn't clear to me how you want to commify floats. How should 1234567.1234 be commified? As 1,234,567.1234, or as 1,234,567.123,4? In the former case, you're just commifying the integer part of the float, so you could use the example from the FAQ. In the latter case, commify the integer part as in the FAQ, and the fractional part as: s/(\d{3})(?=\d)/$1,/.

Abigail

  • Comment on Re: Comma-fy floats with (+/-)look(aheads/behinds)