[Scilab-users] Regex problem

Samuel Gougeon sgougeon at free.fr
Fri Aug 19 17:59:32 CEST 2016


Le 19/08/2016 17:20, Samuel Gougeon a écrit :
> Le 19/08/2016 13:26, Gerhard Kreuzer a écrit :
>> .../....
>> Any idea how I can parse my file and get the binary data blocks into 
>> variables, or at least get pointers to  the starting points, so I am 
>> able to read the binary data with some file read function?
>
> ../...
> regexp(s, "/#data#(.*?)#EOC#)*/ms*");
>
> May be the hardest thing will be to get your binary content as a string.
.
You may try using mgetstr() and see how it behaves on a binary file, 
with respect to embedded ascii(10) or/and non-printable chars with ascii 
codes in [0:31] that will very likely be in any binary content:
https://help.scilab.org/docs/6.0.0/en_US/mgetstr.html

Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160819/d61edf2a/attachment.htm>


More information about the users mailing list