<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 19/08/2016 18:04, Samuel Gougeon a
      écrit :<br>
    </div>
    <blockquote cite="mid:57B72E27.5020502@free.fr" type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Le 19/08/2016 17:20, Samuel Gougeon a
        écrit :<br>
      </div>
      <blockquote cite="mid:57B723BA.9050302@free.fr" type="cite">
        <meta content="text/html; charset=windows-1252"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">Le 19/08/2016 13:26, Gerhard
          Kreuzer a écrit :<br>
        </div>
        <blockquote
          cite="mid:072801d1fa0c$922bca70$b6835f50$@liftoff.at"
          type="cite">
          <meta http-equiv="Content-Type" content="text/html;
            charset=windows-1252">
          <meta name="Generator" content="Microsoft Word 14 (filtered
            medium)">
          <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
@font-face
        {font-family:Monospaced;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Comic Sans MS","serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Courier New";
        mso-fareast-language:DE-AT;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
          <div class="WordSection1">.../...
            <pre><span style="font-size:12.0pt;font-family:"Comic Sans MS","serif"">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?<o:p></o:p></span></pre>
          </div>
        </blockquote>
        <br>
        Here is a working example supporting ascii(10). It looks tha
        "ms" modifiers must be used together:<br>
      </blockquote>
      Aa, actually not: "s" works alone, but as a global modifier (not
      checked after you locally in a capturing parenthesis):<br>
    </blockquote>
    .<br>
    It works also locally:<tt><br>
    </tt><tt>--> s = "abcd" + ascii(10) + "efghijkClmnop" + ascii(10)
      + "fg hiJkl";</tt><tt><br>
    </tt><tt>--> [trash,trash,captures] = regexp(s, "/c(?<b>s</b>:.*?)i/i");
      captures</tt><tt><br>
    </tt><tt> captures  = </tt><tt><br>
    </tt><tt><br>
    </tt><tt>!cd</tt><tt><br>
    </tt><tt>efghi      !</tt><tt><br>
    </tt><tt>!              !</tt><tt><br>
    </tt><tt>!Clmnop</tt><tt><br>
    </tt><tt>fg hi  !</tt><tt><br>
    </tt><br>
    So on your sample, it could be:<br>
    <br>
    <tt>// Sample string including some \n:</tt><tt><br>
    </tt><tt>s = "%!bk{<b>#data#</b>some binary code including \n as
      here" + ascii(10) ..</tt><tt><br>
    </tt><tt>+"etc etc<b>#EOC#</b> intersticial binary<b>#data#</b>Let''s
      go on with binary" + ascii(10) ..</tt><tt><br>
    </tt><tt>+ "other bytes in 0:31 are also of concern<b>#EOC#</b>
      remaining binary content"</tt><tt><br>
    </tt><tt>// Capturing the patterns</tt><tt><br>
    </tt><tt>[t,t,captures] = regexp(s, "/#data#.*?#EOC#/s"); captures</tt><tt><br>
    </tt><tt>// Removing "#data#" and #EOC delimiters:</tt><tt><br>
    </tt><tt>part(captures,7:$-5)</tt><tt><br>
    </tt><tt><br>
      // yielding:</tt><tt> --------------<br>
      <br>
    </tt><tt>--> // Sample string including some \n:</tt><tt><br>
    </tt><tt>--> s = "%!bk{#data#some binary code including \n as
      here" + ascii(10) ..</tt><tt><br>
    </tt><tt>  > +"etc etc#EOC# intersticial binary#data#Let''s go on
      with binary" + ascii(10) ..</tt><tt><br>
    </tt><tt>  > + "other bytes in 0:31 are also of concern#EOC#
      remaining binary content"</tt><tt><br>
    </tt><tt> s  = </tt><tt><br>
    </tt><tt> %!bk{<b>#data#</b>some binary code including \n as here</tt><tt><br>
    </tt><tt>etc etc<b>#EOC#</b> intersticial binary<b>#data#</b>Let's
      go on with binary</tt><tt><br>
    </tt><tt>other bytes </tt><tt>in 0:31 are also of concern<b>#EOC#</b>
      remaining binary content</tt><tt><br>
    </tt><tt><br>
    </tt><tt>--> // Capturing the patterns</tt><tt><br>
    </tt><tt>--> [t,t,captures] = regexp(s, "/#data#.*?#EOC#/s");
      captures</tt><tt><br>
    </tt><tt> captures  = </tt><tt><br>
    </tt><tt>!#data#some binary code including \n as here</tt><tt><br>
    </tt><tt>etc etc#EOC#                     !</tt><tt><br>
    </tt><tt>!#data#Let's go on with binary</tt><tt><br>
    </tt><tt>other bytes in 0:31 are also of concern#EOC#  !</tt><tt><br>
    </tt><tt></tt><tt><br>
    </tt><tt>--> // Removing "#data#" and #EOC delimiters:</tt><tt><br>
    </tt><tt>--> part(captures,7:$-5)</tt><tt><br>
    </tt><tt> ans  =</tt><tt><br>
    </tt><tt>!<font color="#009900">some binary code including \n as
        here</font></tt><font color="#009900"><tt><br>
      </tt></font><tt><font color="#009900">etc etc</font>                    
      !</tt><tt><br>
    </tt><tt>!<font color="#009900">Let's go on with binary</font></tt><font
      color="#009900"><tt><br>
      </tt></font><tt><font color="#009900">other bytes in 0:31 are also
        of concern</font>  !</tt><tt><br>
    </tt><br>
    If you have results with mgetstr() or other ways to feed regexp(),
    would be fine to report them :)<br>
    <br>
    Cheers<br>
    Samuel<br>
    <br>
  </body>
</html>