#!/usr/bin/perl $_ = '1234567'; $_ = reverse $_; s/(\d{3})(?=\d)/$1,/g; $_ = reverse $_; print $_ ; [download]
In reply to Re: simple regex by borisz in thread simple regex by Anonymous Monk