I am having problems using python reg exp to read data from a file.
The file has data that I want, and some information that I am not interested in. Below is an example of the information that interests me. The number of rows will vary
FREQ VM(VOUT) 1.000E+00 4.760E+01 1.002E+00 4.749E+01 Y
I want to create a list of tuples like:
[(1.000, 47.6),(1.002, 47.49)]
I try to read the file until I find the line "FREQ VM (VOUT)" and read the data until I press "Y".
I have 2 questions:
- Is it possible to get all points with one expression or do I need to scroll through each line and look for the beginning? I can't seem to get reg exp to work when I try to find the section and read the points in the same expression.
- How to parse a number contained in technical notation?
I could not find an example that was very close to what I was doing. If he is there, please indicate him to me.
source share