Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

160.Text data calculation -- How to make expression calculation in a text file?

User: editor -- 2008-05-27          << 159  161 >>
Hits: 393
Type: Text data calculation   
Search all Text data calculation examples
Description:
I have a text file containing a lot of maths expressions, can I calculate them all at once?
Input Sample:
(3*4+5*6+22*37)*8
1**2+2**2+3**2
(22+33+44+55)/5
Output Sample:
(3*4+5*6+22*37)*8 = 6848
1**2+2**2+3**2 = 14
(22+33+44+55)/5 = 30.8
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Replace Pioneer integrated a template called "Expression Calculator".
1. ctrl-o open you source file containing one maths expression in each line.
2. Open "Replace->Replace by Template->Misc ... ->Expression Calculator" menu.
3. Click 'OK'
4. Click 'Replace', done!

Note: you can enter any maths expression containing number and operators, here 3**2 means 3*3
Download Script:  scripts/160.rst.zip

Similar Examples:
How to change the direction of all sentences in a text file? (61%)
How to count how many characters, punctuations in a text file? (60%)
How to extract the second column from a database text file? (59%)
How to change the http address to related email address in text file? (57%)
How to calculate summary of every column in a text file? (57%)
How to make base64 encoding on multiple files? (57%)
How to extract all specified date format from a text file? (56%)
How to add sequence number for each non-blank line of a text file? (56%)

Check Demo of Text data calculation
Keywords:
math  calculate  calculation  calcu  template  containing  expression  tem  data  calc  calculation of all number  calculate text data  calculation in text file  file number  text one  text to text  one file