[Scilab-users] Regex problem

Gerhard Kreuzer gerhard.kreuzer at liftoff.at
Fri Aug 19 13:26:46 CEST 2016


Hi,

 

I have a data file containing metadata and binary data. I successfully
scanned the file with .net Regex class, now I want to scan it with SciLab,
but ..

 

The relevant part of  the file looks like:  #data# .. here comes binary data
. #EOC#  .. here comes binary data .  #EOC# .. and so on.

 

My regex in .net notation looks like:  #data#((?<data>(?s:.*?))#EOC#)+
 
Ok, in SciLab the notation is little different:
'/#data#((?P<data>(?s:.*?))#EOC#)+/'
 
This regex expression didn't match at all. I start experimenting and it
looks like that the regex engine stops at a new line character (0x0A) which
i spart of  the binary data block. As far as I know (and that isn't that
far) the clause (?s:.*?) means, take any character until you find #EOC# but
as least as possible.
No interpretation on 0x0A ..
 
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?
 
Thanks a lot for helping
 
With best regards
 
Gerhard
 

 

 

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


More information about the users mailing list