[Scilab-users] Regex problem
Jan Åge Langeland
j-lan at online.no
Fri Aug 26 19:07:42 CEST 2016
Gerhard
Would this work? Read as much as you need as binary and convert the non
ascii values to an ascii value, for instance 0.
The below is not optimized, and I have no idea why the strsplit is
needed, but I got an "unknown error" without it:
fid=mopen(datafile,"rb");
btr=1000;
B=mgeti(btr+1,"uc",fid);
for i=1:btr+1
if B(i)>128 | B(i)<32 then B(i)=48; end
end
S=strsplit(ascii(B),btr);
strData=S(1);
[dataStart,dataEnd,dataMatch,data]=regexp(strData,'/#data#/')
...
Jan Å
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160826/f1c2cc5b/attachment.htm>
More information about the users
mailing list