Here is another way, based on the RE you used:
The trick is to loop looking for groups of 3 digits.
Notice - we look of either trailing COMMA or, end of line.while($col=~s/(\d)(\d\d\d)(,|$)/$1,$2/) {}
In reply to Re: simple regex
by NetWallah
in thread simple regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |