bskinn / pent

pent Extracts Numerical Text -- Mini-language driven parser for structured numerical data in text
MIT License
20 stars 3 forks source link

Live test data: COMSOL run time extraction #76

Open bskinn opened 5 years ago

bskinn commented 5 years ago

Want to extract the 286 from Run time: 286 s. in the below data:

---------- Current Progress: 100 % - Updating plots
Memory: 930/1020 1127/1235
   -        6050           - out
   -        6060           - out
   -        6070           - out
   -        6080           - out
   -        6090           - out
   -        6100           - out
   -        6110           - out
   -        6120           - out
   -        6130           - out
   -        6140           - out
   -        6150           - out
   -        6160           - out
   -        6170           - out
   -        6180           - out
   -        6190           - out
   -        6200           - out
   -        6210           - out
   -        6220           - out
1782      6294.2      262.14       72   37   72     4     0      0  1.3e-15  1.4e-14
Time-stepping completed.
Geometry shape order: Linear
---------- Current Progress: 100 % - Compiling equations
Memory: 932/1020 1136/1235
Solution time: 285 s. (4 minutes, 45 seconds)
Physical memory: 1.02 GB
Virtual memory: 1.23 GB
Ended at Sep 12, 2019 4:19:35 PM.
----- Time-Dependent Solver 1 in Study 1/Solution 1 (sol1) -------------------->
Run time: 286 s.
Saving model: D:\Model.mph
Save time: 1 s.
Total time: 292 s.

Parser:

prs_runtime = pent.Parser(
    head="~ @x+- @.>",
    body="'@.Run time:' #!.+i ~",
)