I generally do this by importing all of the data, so that I have the numbers imported as numbers, and then select the data from the raw import. In the code below two methods are shown. The first assumes that the data is a single block of lines, each with 4 reals. The second method finds the positions of the start and end delimiters and takes the elements in between.
Best,
David
In[1]:= SetDirectory[NotebookDirectory[]]
Out[1]= "C:\\Users\\David\\Desktop\\Erick"
In[2]:= raw =
Import["test.txt", "Table", "FieldSeparators" -> { " ", ","}]
Out[2]= {{"#A", "Albert"}, {"#B", 0.5, "%"}, {"#C",
0.01726}, {"$V"}, {-25., -25., 5., 0.053609}, {-24., -25., 5.,
0.065964}, {-23., -25., 5., 0.051466}, {-22., -25., 5.,
0.053896}, {"$E"}}
In[3]:= (* By pattern match *)
In[4]:= data1 = Cases[raw, {_Real, _Real, _Real, _Real}]
Out[4]= {{-25., -25., 5., 0.053609}, {-24., -25., 5.,
0.065964}, {-23., -25., 5., 0.051466}, {-22., -25., 5., 0.053896}}
In[5]:= (* by delimiters *)
In[6]:= start = Position[raw, {"$V"}][[1, 1]] + 1
Out[6]= 5
In[7]:= end = Position[raw, {"$E"}][[1, 1]] - 1
Out[7]= 8
In[8]:= data2 = raw[[start ;; end]]
Out[8]= {{-25., -25., 5., 0.053609}, {-24., -25., 5.,
0.065964}, {-23., -25., 5., 0.051466}, {-22., -25., 5., 0.053896}}
Attachments: