I am looking for a regex to be used for comma substitution for numbers, i.e. the regex
would transform:
999 = 999
= 9,999
9 = 99,999
99 = 999,999
999 = 9,999,999, etc.
I tried s/(\d{3})/,$1/g, but for certain numbers it leaves a leading comma, i.e.
99
]]
Sent: Friday, December 21, 2001 13:18
To: perl-win32-users
Subject: Regex for comma substitution
I am looking for a regex to be used for comma substitution for numbers, i.e. the regex
would transform:
999 = 999
= 9,999
9 = 99,999
99 = 999,999
999 = 9,999,999
Dirk Bremer wrote:
I am looking for a regex to be used for comma substitution for numbers, i.e. the
regex would transform:
999 = 999
= 9,999
9 = 99,999
99 = 999,999
999 = 9,999,999, etc.
I tried s/(\d{3})/,$1/g, but for certain numbers it leaves a
Dirk Bremer wrote:
I am looking for a regex to be used for comma substitution for numbers,
i.e. the regex would transform:
999 = 999
= 9,999
9 = 99,999
99 = 999,999
999 = 9,999,999, etc.
I tried s/(\d{3})/,$1/g, but for certain numbers it