Re: How can I output my numbers with commas added?
[email protected] (pizza)
| Newsgroups | perl.perlfaq.workers |
|---|---|
| Message-ID | <[email protected]> |
_brian_d_foy wrote: > In article <[email protected]>, Pizza > <[email protected]> wrote: > >> i offer the following regex in replacement to Mr. Goldberg's: >> >> s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g; >> > > what's the advantage to yours? > it's shorter, simpler and (hopefully) a little easier to understand.