Convert Scientific notation number to expanded form

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Convert Scientific notation number to expanded form

Postby DataMystic Support » Fri Jun 24, 2016 10:35 am

Here is a simple filter that converts numbers of the form

Code: Select all

138E3

to

Code: Select all

138000


(note: It doesn't work for negative values)

It's designed to work with the data in CSV field 1.

Code: Select all

Restrict fields:1 Comma-delimited fields starting at field 1
|  [X] Process fields individually
|    [X] Exclude delimiter
|      [X] Exclude quotes (if present)
|  Delimiter Type: 0
|  Custom delimiter:
|  [ ] Has Header
|
+--EasyPattern [E[ capture( longest 1+ digits ) ]] with [$1]
   |  [X] Match case
   |  [ ] Whole words only
   |  [ ] Case sensitive replace
   |  [ ] Prompt on replace
   |  [ ] Skip prompt if identical
   |  [ ] First only
   |  [ ] Extract matches
   |  Maximum text buffer size 4096
   |
   +--VBScript script  Timeout: 10000 milliseconds
         'This example script keeps a line counter that
         'does not reset for each file
         
         'Our line counter
         dim zeroes
         
         'Called for every line in the file
         'EOL contains the end of line characters (Unix, DOS or Mac) that must be
         'appended to each line
         function processLine(count, EOL)
         
           zeroes = ""
           for i = 1 to count
              zeroes = zeroes + "0"
           next
           
           processLine = zeroes & EOL
         end function
         
         
         sub startJob()
         end sub
         
         
         sub endJob()
           'do nothing
         end sub
         
         
         function startFile()
           startFile = ""
         end function
         
         
         function endFile()
           endFile = ""
         end function
       
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest