I have a text file which contains a list of variable each one with the correspondent value. It has the following structure
% Author: Name Surname
% Date: /../..
% Other things ...
%----------------------------
% Output:
% Var1 = [1 0.5 5][8 5 0.9]
% Var2 = The signal is one from 0 sec to 0.5 sec; then its value increase ...
the description could span more than one row...
% Var3 = [...][...]
% Var4 = The signal is ...
% ...
% ------------------------------------------
Until now I've extracted the entire file into a strings from which I've extracted in turn the Author and other general infos.
What I have to do at this point is Extract the part of the file after %Output: by copying each variable name and value into a word table using VBA.
The table has two columns (var_name, var_value) and should has as many rows as the variables extracted are.
Once I will have each var and its value into strings, the VBA code to write these strings into the table it's straitforward.
Due to the particular structure of the document's part containing the outputs, I don't know how to extract var and its value.
I think I could extract the variable name first and then use these as bounds for the next search, I mean, suppose I had got var2 an var3 somehow, I could write some code to get everything beween them and assign it to a string:
StringValueVar2 = The signal is one from 0 sec to 0.5 sec; then its value increase ...
the description could span more than one row...
%
then clean this string the Remove function from % and spaces.
So, how can I proceed?