[Scilab-users] Regex problem
Jan Åge Langeland
j-lan at online.no
Sun Aug 28 13:01:17 CEST 2016
Very good, a way of using logical operators that I was not aware of.
Even this seems to works:
data(data<32|data>127)=ascii(".")
Thank you also Samuel for fixing the mgeti('l') bug. Both will help me a
lot in reading and decoding some large seismic files.
Jan Å
On 28.08.2016 06:20, Samuel Gougeon wrote:
> Hello,
> Here is another (fast) implementation. You get directly all the binary
> blocs of a file in an output list.
> Cheers
> Samuel
> --------------------
> function [res, bytes]=getBinaryBlocs(data, startstr, endstr) fid =
> mopen(data, 'rb') data = mgeti(1e6, 'uc', fid) mclose(fid) bytes =
> data s = data<32 | data>127 data(s) = ascii(".")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160828/1495fcb1/attachment.htm>
More information about the users
mailing list