higle,
using s?printf in this context is not a kludge at all! It's simply the most straightforward way to get the job done, we're functions meant for this purpose.
Without thinking too much about it, I'd guess that a substitution regexp would require the e modifier to get the formatting job done. So it would be more cumbersome, more computationally expensive, harder to debug, probably uglier too :-)
-- TMTOWTDI
In reply to Re: Re: Dollars and regex cents
by trantor
in thread Dollars and regex cents
by higle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |