Find and Replace with Decimal Numbers
Posted: Wed Dec 02, 2009 5:14 pm
I have a large amount of text in the following format:
EC,090610,170000,01395.60,1
The next to the last element in this comma-delimited series (01395.60) needs to have the leading zero stripped away, and the number needs to be divided by 1,000 to yield 1.3560. The final result should be five digits, one digit before the decimal and four after the decimal.
Is it possible to perform this transformation with a regular expression?
Thank you.
EC,090610,170000,01395.60,1
The next to the last element in this comma-delimited series (01395.60) needs to have the leading zero stripped away, and the number needs to be divided by 1,000 to yield 1.3560. The final result should be five digits, one digit before the decimal and four after the decimal.
Is it possible to perform this transformation with a regular expression?
Thank you.