perl -le 'for(@ARGV){s/\./,/;s/(?<=\d)(?=(\d\d\d)+(,|\Z))/./g;print}' +1234567.89 234567.89 1234567 234567 1.234.567,89 234.567,89 1.234.567 234.567
update..
Ok.. yours is shorter... mine is probably more efficient for not invoking $& at least :)
In reply to Re^2: Golf, anyone? :)
by suaveant
in thread disappearing digit with regex and tr
by zentara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |