Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

932.Text data calculation -- How to batch change decimal numbers by rounding to 3 decimal places?

User: caoyongrui -- 2012-03-29          << 931  933 >>
Hits: 3084
Type: Text data calculation   
Search all Text data calculation examples
I want to change number of digit after the decimal point to 3 to round up or down. I have try but have no result. Thank you
Input Sample:
KPT,    1058,  -12750.0000000    ,  0.156137310112E-11,   800.423569    
KPT,    1059,  -12550.0000000    ,  -0.153688097405E-11,   -800.2369852    
KPT,    1060,  -12150.0000000    ,  0.148789671989E-11,   0.0236522  
Output Sample:
KPT,    1058,  -12750.000    ,  0.000,   800.424    
KPT,    1059,  -12550.000    ,  0.000,   -800.237    
KPT,    1060,  -12150.000    ,  0.000,   0.024  
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open 'replace' dialogue
* set 'search for pattern' to:

* set 'replace with pattern' to:

3. click 'replace', done.
4. ctrl-s save to file.

Note: the (E[+-]\d+)? is used for matching numbers with scientific notation.

Screenshot 1:  Replace_Window

Similar Examples:
How to change all numbers in a text file to 2 decimial places? (72%)
How to change all numbers in a text file to the comma separated numbers? (58%)
How to change the location of all numbers randomly? (56%)
How to change the number to the corresponding letter base on mapping table? (55%)
How to batch change a lot of xml files, adding all <ID> by 1? (55%)
How to batch change format of multiple files? (54%)
How to change all lines to columns in a text? (53%)
How to calculate the average of all numbers that preceded by dollar sign? (52%)

Check Demo of Text data calculation
scientific notation  round up  decimal numbers  matching  round  odd  decimal number  chin  decimal  toc  batch round number up  batch round up number  decimal point  batch calculation round up  batch round number  batch round decimal  batch rounding numbers  decimal places batch