MATLAB: Reading text file with multiple rows and columns

.csv filemultiple columnsmultiple rowsread and savetext file

How can i read my text file which has 2-3 lines of unwanted message and then reading of data in this format:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2019.02.26 16:14:15 =~=~=~=~=~=~=~=~=~=~=~=
AS7263 online!
Reading: R[7.39] S[7.65] T[8.28] U[9.98] V[7.27] W[8.66] tempF[93.2]
Reading: R[7.39] S[7.65] T[8.28] U[9.98] V[8.31] W[8.66] tempF[93.2]
Reading: R[7.39] S[7.65] T[8.28] U[9.98] V[8.31] W[8.66] tempF[93.2]
Reading: R[7.39] S[7.65] T[8.28] U[9.98] V[8.31] W[8.66] tempF[93.2]
Reading: R[7.39] S[7.65] T[8.28] U[9.98] V[8.31] W[8.66] tempF[93.2]
Reading: R[7.39] S[7.65] T[8.28] U[9.98] V[7.27] W[8.66] tempF[93.2]
Reading: R[7.39] S[7.65] T[8.28] U[9.98] V[7.27] W[8.66] tempF[93.2]
Reading: R[7.39] S[7.65] T[8.28] U[9.98] V[7.27] W[8.66] tempF[93.2]
I want to extract labels like R,S,T,U,V,W,temp and their respective values.

Best Answer

z = fopen('now1.txt'); c = textscan(z,'%s','delimiter','\n'); fclose(z);
t = regexp(c{:}{3},'\w*(?=\[)','match');
n = regexp(c{:},'(?<=\[)\d+\.\d+(?=\])','match');
out = array2table(str2double(cat(1,n{:})),'V',t);
Here now1.txt - text file with your data.