<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thanks Samuel,<br>
    <br>
    That works fine.<br>
    <br>
    Regards<br>
    Jens<br>
--------------------------------------------------------------------------------------<br>
    <div class="moz-cite-prefix">Am 05.12.2018 21:50, schrieb Samuel
      Gougeon:<br>
    </div>
    <blockquote cite="mid:8efb7b87-9f74-26e4-4a6c-233d5ae422d7@free.fr"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html;
        charset=windows-1252">
      <div class="moz-cite-prefix">Hello Jens,<br>
        <br>
        Le 05/12/2018 à 17:47, Jens Simon Strom a écrit :<br>
      </div>
      <blockquote cite="mid:5C080137.1070401@hslmg.de" type="cite">
        <div class="refnamediv">
          <p class="refpurpose"> Hallo Scilab experts,<br>
            I am looking for a command to</p>
          <p class="refpurpose"><b>return the match (or position) of a
              character string (=needle) in a </b><b>vector</b><b> of
              strings (=haystack), where needle may be a regular
              expression</b><br>
          </p>
          <p class="refpurpose">Needle occurs only once in any line of
            haystack. That may ease the problem.<br>
          </p>
          <p class="refpurpose"> </p>
          <div class="refsynopsisdiv">
            <div class="synopsis">
              <pre><span class="default">[start, final, match] = </span><span class="functionid">regexp</span><span class="default">(input, pattern, 'r') is very close to it but does not accept a vector of strings as a haystack.

I hope to have overlooked something in my search. Is there such a command?  

Vectorisation is essential here because otherwise the search is too slow for many lines (<10^6).</span></pre>
            </div>
          </div>
        </div>
      </blockquote>
      <br>
      You may concatenate your input array with some gluing character
      that you know is not in the strings (for instance, likely,
      ascii(10)), and then use regexp() on the single glued result.<br>
      <br>
      HTH<br>
      Samuel<br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>